add_proposal_battery
ChatGPTAdds a NEW battery line to a proposal, on top of whatever storage it already has. New proposals usually come with a battery already on them from the company catalog, so call get_products_offer first: when the user asks for a total number of batteries and a line already exists, change that line with update_proposal_battery instead — adding here would leave the proposal with more batteries than requested. Use this only to put a battery MODEL on a proposal that does not have it yet. product_branch_office is a catalog battery id from list_catalog_products with product_type='batteries'; pricing comes from the catalog.
configure_proposal
ChatGPTApplies one or more proposal components in dependency order: panel, inverter, battery, storage (BESS), costing type and discount. Use this when configuring multiple components in one request; omitted components are left unchanged. Changing the panel can affect compatible inverters, so the panel is applied first. This operation is not transactional: it stops at the first failure, keeps earlier changes and returns applied, failed and the status of each step.
configure_proposal_storage
ChatGPTUpdates a proposal's battery storage (BESS) model and consumption-based sizing. Use this when the platform should calculate the battery quantity from storage_percent; use update_proposal_battery to set an exact quantity. battery_branch_office is a catalog battery id from list_catalog_products with product_type='batteries'. application_type is 0 for off-grid or 1 for grid-tied. storage_percent is the share of consumption the storage should cover, from 0 to 1. When setting storage_percent, also pass application_type. Passing application_type without storage_percent sets storage_percent to 0 and submits the application block's default percentage values, so read the current configuration first with get_proposal_storage.
create_contact
ChatGPTCreate a contact in the Sunwise app. Args: name: Name of the contact (required). email: Email address of the contact (required). first_lastname: First last name of the contact (optional, default is an empty string). second_lastname: Second last name of the contact (optional, default is an empty string). integration_source: Source of the integration (optional, default is an empty string). telephone: Telephone number of the contact (optional, default is an empty string). status_flag: Status of the contact (optional, default is "active" options: "archived", "active"). agent: Agent associated with the contact (optional, default is an empty string). company_name: Name of the company (optional, default is an empty string). contact_origin: Origin of the contact (optional, default is None). status_contact: Status of the contact (optional, default is None). Returns: A dictionary containing the contact information.
create_contact_tracking
ChatGPTLog a follow-up (tracking) for a contact: a call, visit, message or similar activity. When the contact does not exist yet, it is created in the same call. Writes only to the caller's Sunwise account. Returns the created tracking entry.
create_energies_without_consumptions
ChatGPTCreate energy records without consumption data. Use this to update consumption data in case you are getting a consumption related error.
create_financing_in_proposal
ChatGPTCreate a financing plan for a commercial offer (proposal) using the provided financing request data. Request Parameters - proposal_id (UUID): Identifier of the commercial offer to create a financing plan for. Must correspond to a proposal that does not yet have an active financing plan. The proposal ID can be retrieved using the tools tagged "proposals" or "projects". - financier_id (UUID): Identifier of the selected financier. Must be a value returned by the get_financing_options_for_proposal tool. Call that tool first to retrieve the available financiers for this proposal. - financier_product_id (UUID): Identifier of the specific financing product under the selected financier. Must be a value returned by the get_financing_options_for_proposal tool. - term (int): Duration of the financing plan in months. Must be one of the term options returned by the get_financing_options_for_proposal tool for the selected financier product. Response - Returns a dictionary containing the created financing plan data.
create_project
ChatGPTCreate a new project in the Sunwise platform without requiring consumption data. This tool is used to initialize a project associated with a specific contact. It is especially useful when you want to create a project as an initial step in the workflow, even if detailed consumption information is not yet available. Args: contact_id: Unique identifier (UUID) of the contact to associate the new project with (required). project_name: Name of the new project to be created (required). zip_code: Postal code of the project's location (optional, default is None). service_number: Service number or identifier associated with the electrical service (optional, default is None). Notes: - This tool creates a new project without needing any consumption data at the time of creation. - The contact_id must correspond to an existing contact in the Sunwise system. - The project_name is required and uniquely identifies the project. - You can optionally provide zip_code and service_number to enrich the project metadata. Returns: A dictionary containing the details of the created project, including its unique ID, name, associated contact, and any additional metadata provided.
create_project_with_contact
ChatGPTCreate a project, creating the contact too when it does not exist, optionally setting the project's consumption data in the same call. For a contact that already exists and no consumption data, create_project covers the direct case. The chain is not atomic: if the project step fails after the contact was created, the contact remains and its id can be reused. Returns the created project.
create_projects_from_uploaded_files
ChatGPTCreate Sunwise projects from CFE bill files (PDF, XML, or PNG) that were previously uploaded with the file_manager widget. Files are read server-side from storage. By default, files are grouped by CFE service number, and one project is created per group. The tool then creates the project's consumption data and commercial offer. Set pre_group_files=false to create one project per file. Pass project_name to name the project. It applies only when the files belong to a single project. completion chooses how far that background run goes: the project and its consumption alone, a draft commercial offer as well, or the rendered proposal document too (the default). Returns one entry per project: project_id, name, service_number, the files it was built from, and already_existed — true when the contact already had that project and it was left untouched, so calling again is safe and will not duplicate anything.
create_proposal
ChatGPTCreate a new commercial proposal within an existing project in the Sunwise platform. This tool allows you to initialize a proposal inside a specific project, optionally using a preset plan and triggering automatic generation from a predefined template. It is useful for automating proposal creation workflows directly from other systems or assistants. Args: project_id: Unique identifier (UUID) of the project where the proposal will be created (required). name: Name of the new proposal (required). generate: Flag indicating whether the proposal should be automatically generated upon creation (optional, default is 0). Use 1 to enable automatic generation. preset: Name of the preset plan to initialize the proposal with (optional, default is None). If provided, the proposal will use the template associated with that preset. Notes: - If a preset is provided, the proposal will be initialized using the corresponding plan and template. - If generate=1, the proposal will be generated immediately upon creation. - If no preset is provided, the proposal is still created, using the project's default template. - The name field is mandatory and identifies the proposal within the project. Returns: A dictionary representing the created proposal, including metadata, status, and configuration details.
create_proposal_with_contact
ChatGPTCreate a proposal, creating or reusing a contact and project by ID. Provide zip_code for a new or unconfigured project without consumption data. Missing configuration is prepared from that ZIP; existing consumptions are preserved. Use create_proposal for an already-configured project when only a proposal is needed. The chain is not atomic: if a later step fails, earlier records remain. Check for and reuse those records before retrying to avoid duplicates. Returns the created proposal.
create_report
ChatGPTCreate a new report for a given project and a specific historical record. This tool allows you to generate a new report associated with a specified project and historical data record on the Sunwise platform. Args: history_id (str): you should provide the ID of the historical record to base the report on. This can be retrieved from the "get_historical_electrical_bills" tool. report_name (str): The name to assign to the new report. project_id (UUID): The unique identifier of the project to associate with the report. Returns: An object containing: - id: Unique identifier of the created report. - name: Name of the report. - commercial_offer: Commercial offer details associated with the report. - project_id: The unique identifier of the associated project. - interactive_data: Public URL or data for interacting with the report (if available).
create_rpu
ChatGPTRegisters a 12-digit CFE service number as an RPU in LISA and, when fetch_periods is true (the default), starts an asynchronous task that logs into CFE and downloads up to max_periods billing periods. Each downloaded period is billed to the account as a LISA credits_period; calling again starts another download and bills again. Returns the task handle — its progress is readable with get_lisa_task_logs.
delete_uploaded_file
ChatGPTPermanently delete one of the user's uploaded files from their Sunwise file storage. Also available as the trash button next to each file in the file_manager widget. Args: file_name: Name of an uploaded file, exactly as returned by list_files (required). Notes: - The file is removed from storage and cannot be recovered; confirm the name with the user before calling. - Deleting a file does not affect projects, proposals or consumptions already created from it. - A name that is not stored deletes nothing and returns deleted: false. Returns: deleted, the file name, and the caller's remaining files.
file_manager
ChatGPTOpen the file upload widget so the user can drag and drop CFE bills (PDF or XML) and send them to their Sunwise file storage. The files never enter the conversation; use them afterwards with create_projects_from_uploaded_files or list_files. Notes: - Opening the widget changes nothing; uploads only happen when the user drops files and confirms. - Each listed file has a trash button that deletes it from storage permanently. - Files are deleted automatically after 7 days.
find_pml_nodes
ChatGPTReturns the CENACE grid nodes that most likely serve a solar project's installation site in Mexico, resolved from the site's coordinates against CFE's medium-voltage network data. Each result includes the node code (clave), its name, electrical system and location. Several candidate nodes are normally returned, ordered by likelihood, and the list is empty when no node matches the coordinates. The coordinates identify a project site, not a person; supplying state narrows the search and avoids a geocoding step.
generate_proposal
ChatGPTGenerates (renders) a proposal that was created as a draft — the final step after configuring panels, inverters, batteries and pricing. This LOCKS the proposal: once generated it can no longer be edited, so every change must be made before calling this. Ask the user to confirm before generating. Calling it on an already generated proposal re-renders it. template_id is optional — the proposal's own template is used when it has one, otherwise the project's.
get_active_report
ChatGPTRetrieve details of a specific active report by its UUID.
get_active_reports
ChatGPTRetrieve a list of active reports generated by the authenticated user in the Sunwise platform. This tool allows you to programmatically access all active reports created by the current user, including essential metadata and public URLs where you can see the report itself. Notes: - Only reports generated by the currently authenticated user are returned. - If the user has no active reports, the tool will return an empty list. - Each report includes a public URL that can be used for sharing or embedding purposes. - Reports are linked to their associated project and contact, providing contextual information useful for further automation. Returns: A list of ReportWithUrl objects, each containing: - id: Unique identifier of the report. - name: Name of the report. - interactive_data: Public URL for the report data. - project: Details of the associated project, including its ID and name. - contact: Contact information linked to the project, including its ID and name. - url: A public URL for accessing the report.
get_contact_by_id
ChatGPTRetrieve a contact by its UUID identifier.
get_contact_projects
ChatGPTRetrieve projects associated with a specific contact.
get_critical_hours
ChatGPTReturns the current critical hours for one Mexican electrical system (SIN, BCA or BCS) together with its MBP bonus value. Critical hours are the intervals CENACE designates for capacity charges.
get_favorite_commercial_proposal_from_project
ChatGPTRetrieve the favorite commercial proposal associated with a specific project in the Sunwise platform. This tool allows you to programmatically access the commercial proposal marked as "favorite" for a given project. It is useful for quickly identifying the most relevant or approved proposal among multiple options linked to a project. Args: project_id: Unique identifier (UUID) of the project from which to retrieve the favorite commercial proposal (required). Notes: - If a favorite commercial proposal exists for the specified project, its details will be returned. - If no favorite proposal has been set, the response may indicate that no such proposal exists. - This tool is useful for downstream automations that require accessing the primary commercial offer for reporting, analysis, or further processing. Returns: A FavoriteCommercialOfferResponse object containing the details of the favorite commercial proposal, including its ID, associated metadata, and related project information.
get_financing_options_for_proposal
ChatGPTRetrieve financing options for a commercial offer (proposal) by its ID. No request body is required; authentication context is used. Request Parameters - proposal_id (UUID): Identifier of the commercial offer to retrieve financing options for. - business_type (str): The type of business entity for the financing applicant. This value determines which financing products are returned, as available options differ by entity type. Accepted values: - "person_company": A company associated with an individual (moral person with a named representative). - "company": A standalone corporate entity. - "physical_person": An individual person. This parameter is required and must be confirmed with the end user before calling the tool, since financing products vary significantly by business type. Response - Returns a list of dictionaries representing the financing options, including available financiers and their associated financier products.
get_historical_electrical_bills
ChatGPTRetrieve all usable historical electrical bills for a specific project. Returns a list of bill records each containing a history_id. If the list is empty, stop immediately and tell the user the project has no bills and a report cannot be created until bills are uploaded in Sunwise. Do not retry.
get_lisa_task_logs
ChatGPTReturns the execution log of one LISA task — the download jobs started by create_rpu or sync_rpu — showing its progress and outcome. task_id is the handle those tools return. Each call is a metered request, so polling should be spaced out.
get_monitoring_indicators
ChatGPTReturns the account's After Sales monitoring KPIs: cumulative and current/previous-month generated energy (kWh) with the number of reporting projects, plus counts of active, alerted, inactive and unmonitored projects.
get_offer_details
ChatGPTReturns the stored offer details of one proposal: totals, pricing and configuration, consumption and savings figures, and the related project and contact references, as Sunwise returns them.
get_pml_price_summary
ChatGPTReturns a CENACE node's PML (Precio Marginal Local) electricity prices for a date range, aggregated into one row per calendar month with the average, minimum and maximum price and the number of hourly records behind each row. Prices are in MXN per kWh. node is a CENACE node code such as '01SCD-230' and system is the node's own electrical system. Results are aggregated because a single year covers about 8,760 hourly records. CENACE publishes with a seven-day delay, so the range is capped at seven days before today and a range ending later than that returns fewer days than requested.
get_preset
ChatGPTRetrieve detailed information about a specific proposal plan by its UUID identifier. It returns comprehensive details about the preset.
get_presets_list
ChatGPTRetrieve all active proposal plans for the authenticated user's company. It returns a list with UUIDs, names and basic information about each preset.
get_products_offer
ChatGPTReturns the products currently applied to one proposal — panels, inverters, batteries, accessories, structures, workforce, additionals and taxes — each with its quantity, cost, margin, discount and final price.
get_project
ChatGPTRetrieves a specific project by its ID. Returns a single Project object containing key details of the project, including its ID, name, associated contact, and metadata, or None if the project is not found.
get_project_consumption
ChatGPTReturns a project's stored electricity consumption record: the rate, service data and consumption periods Sunwise holds for it. This is the consumption that proposals for the project are calculated from.
get_project_funnel
ChatGPTReturns one page of the company's project funnel (pipeline): each row carries the project, its stage, contact and key figures. status filters by stage and project_name by name; results are paginated.
get_project_monitoring_summary
ChatGPTReturns one row per day of a monitored project's telemetry over a date range: generated vs estimated energy (kWh), total/grid/self consumption when the installation reports them, average battery state of charge when present, and how many 5-minute intervals the day had and how many were missing. The range covers at most 92 days. Values are daily aggregates of 5-minute readings; the raw series is available on the REST endpoint, not through this tool.
get_project_summaries_list
ChatGPTRetrieve a list of project summaries for the authenticated user. Each summary includes the summary name, associated contact, an interactive summary URL, and a list of related projects.
get_project_summary
ChatGPTRetrieve a single project summary by its UUID for the authenticated user. The summary includes the summary name, associated contact, an interactive summary URL, and a list of related projects.
get_proposal
ChatGPTRetrieve a proposal associated with a given proposal UUID.
get_proposal_financing_info
ChatGPTRetrieve detailed financing information for a commercial offer that has an active financing plan applied. No request body is required; authentication context is used. Request Parameters - proposal_id (UUID): Identifier of the commercial offer to retrieve financing information for. Response - Returns a dictionary containing the commercial offer data with its financing information data.
get_proposal_storage
ChatGPTReads the battery storage (BESS) configuration of a proposal: the batteries on the offer, the storage plan (daily capacity, backup days) and the time-shifting settings. Call this before configure_proposal_storage to see the current values.
get_proposal_summaries_list
ChatGPTRetrieve a list of proposal summaries associated with the authenticated user in the Sunwise platform. Each summary contains key contextual information, including associated project and contact details, as well as the proposals it consolidates. This is useful for listing, displaying, or selecting summaries in downstream workflows. Notes: - The interactive_data field provides a public URL to view the summary interactively. - If no summaries exist for the user, an empty list will be returned. Returns: A list of ProposalSummary objects, each containing: - id: Unique identifier (UUID) of the summary. - name: Name of the summary. - project_id and project_name: ID and name of the associated project. - contact_id and contact_name: ID and name of the associated contact. - interactive_data: A public URL for accessing the summary interactively. - linked_proposals: A list of proposals included in the summary, with their IDs and names.
get_proposal_summary
ChatGPTRetrieve a single proposal summary by its UUID from the Sunwise platform. This tool allows you to fetch the full details of a specific proposal summary, including its associated project, contact, linked proposals, and the public URL for interactive viewing. It is useful for displaying summary details, sharing them externally, or building workflows around a specific summary. Args: summary_id: The unique identifier (UUID) of the summary to retrieve (required). Notes: - The interactive_data field provides a public URL that can be used to open the summary in a browser. Returns: A ProposalSummary object containing: - id: Unique identifier (UUID) of the summary. - name: Name of the summary. - project_id and project_name: ID and name of the associated project. - contact_id and contact_name: ID and name of the associated contact. - interactive_data: A public URL to view the summary interactively. - linked_proposals: A list of linked proposals, including their IDs and names.
get_proposals
ChatGPTRetrieve all proposals associated with the authenticated user's company.
get_proposals_in_project
ChatGPTRetrieve all proposals associated with a given project UUID.
get_recent_projects
ChatGPTRetrieve the three most recent projects associated with the authenticated user in the Sunwise platform. This tool allows you to quickly access the latest projects created or updated by the current user. It is useful for workflows that require referencing recent activity — for example, suggesting actions on active projects, retrieving context for ongoing proposals, or automating follow-ups. Notes: - Returns up to three projects, ordered from most recently created or updated to least recent. - Only projects associated with the currently authenticated user are included. - The response is not given per contact, is a list of the user's recent projects across all contacts. - This tool is ideal for use cases such as surfacing recent work, initializing proposal creation, or listing active opportunities. Returns: A list of up to three ProjectZapierSchemaResponse objects, each containing key details of the project, including its ID, name, associated contact, and metadata.
get_rpus_by_service_number
ChatGPTReturns the RPUs (CFE service records) registered in LISA for one 12-digit CFE service number, each with its id, rate and service data. Returns an empty list when the account has no RPU for that number.
get_wise_project
ChatGPTReturns one WISE extraction project with its documents and their processing status.
list_catalog_products
ChatGPTReturns one page of the company's product catalog for a product type — panels, inverters, batteries, accessories, structures, workforces or additionals — scoped to the caller's branch offices. Each item carries its catalog id, brand and model data, and costing information. search filters by text; results are paginated.
list_contact_trackings
ChatGPTReturns the follow-up (tracking) records logged for one contact, most recent first. Each tracking carries its type, objective, description, date and its comments with author information.
list_contacts
ChatGPTRetrieve a list of contacts associated with the authenticated user.
list_contacts_paginated
ChatGPTReturns one page of the contacts the user can see in Sunwise. To find a specific contact by name or email, prefer search_contacts. status_flag selects active (default), archived or all contacts; results are paginated.
list_files
ChatGPTList the files the user has uploaded to their Sunwise file storage, with size, content type and upload date. Returns: One entry per stored file: name, type, size, size_display and uploaded_at.
list_pml_nodes_by_region
ChatGPTReturns the CENACE nodes belonging to one regional control centre, each with its node code, electrical system and approximate coordinates. region is a region name as returned by list_pml_regions, such as 'CENTRAL'. A region may contain several hundred nodes.
list_pml_regions
ChatGPTReturns the CENACE regional control centres in Mexico, each with its node count, the electrical systems it covers and the states it spans.
list_rpu_periods
ChatGPTReturns one page of the billing periods LISA holds for one RPU: each period's dates, consumption and billing figures as fetched from CFE. rpu_id comes from get_rpus_by_service_number; results are paginated.
list_wise_models
ChatGPTReturns the extraction models available to the account for reading CFE documents, each with its id, name and description.
list_wise_projects
ChatGPTReturns the caller's WISE extraction projects, each with its id, status and the documents it contains.
read_file
ChatGPTRead one uploaded file by name. Text files (CSV, JSON, TXT…) return their decoded content; binary files (PDF, images) return only a short base64 preview — workflows read the bytes server-side, so the full content never enters the conversation. Args: file_name: Name of an uploaded file, exactly as returned by list_files (required). Returns: The file's name, size and type, plus content (text) or content_base64 (truncated preview).
search_contacts
ChatGPTSearches for active contacts that match a given name, company name, or email address associated with the authenticated user. Returns a list of matching contacts with their details like ID, name, last names, emails, telephones, company name, and creation date.
search_project_summaries
ChatGPTSearches for active project summaries that match a given name or contact name.
search_projects
ChatGPTSearches for active projects that match a given name, customer name, contact name, or service number associated with the authenticated user. Returns a list of matching projects with their details like ID, name, customer name, contact name, service number, status, and creation date.
search_proposal_summaries
ChatGPTSearches for active proposal summaries that match a given name, contact name or project name.
search_proposals
ChatGPTSearches for active proposals that match a given name, customer name, contact name or project name.
search_reports
ChatGPTSearches for active reports that match a given name, contact name or project name.
set_proposal_costing_type
ChatGPTSets how a proposal is costed — per product (by_product) or per watt (by_watt) — and the per-watt / per-kWh cost, price, margin and total figures that apply. Only the fields sent are changed; the rest keep their current values. Overwrites the proposal's current costing configuration and triggers its recalculation.
set_proposal_discount
ChatGPTSets a proposal's overall discount or increment: the discount type, its percentage or fixed amount, or an increment amount. Overwrites the proposal's current discount configuration and triggers its recalculation.
setup_project_for_proposals
ChatGPTPrepares a project so proposals can be created on it, by setting its location from a ZIP code and creating the energy records a proposal needs. Use this when creating a proposal fails because the project has no consumption data yet — a project created without a utility bill starts in that state. Safe to call again on an already prepared project.
simulate_financing
ChatGPTComputes the financing terms a financier product would give one proposal — payment schedule and totals for the requested term and optional down payment — without modifying the proposal or creating an application. financier_id, financier_product_id and a valid term come from get_financing_options_for_proposal; applying a plan is a separate tool (create_financing_in_proposal).
store_uploaded_files
ChatGPTStore the files dropped into the file_manager widget in the user's Sunwise file storage. Called by the widget's Upload button; there is normally no reason to call it directly. Args: files: File objects with name, size, type and data (base64-encoded content), as sent by the widget. Notes: - Uploading a file with an existing name replaces that file. - Files are deleted automatically after 7 days. Returns: The caller's stored files, as returned by list_files.
sync_rpu
ChatGPTStarts an asynchronous LISA task that logs into CFE and downloads up to max_periods fresh billing periods for an already-registered RPU. Each downloaded period is billed to the account as a LISA credits_period; calling again starts another download and bills again. Returns the task handle — its progress is readable with get_lisa_task_logs.
update_contact
ChatGPTUpdate a contact in the Sunwise app. Args: contact_id: ID of the contact to update (required). name: Name of the contact (required). first_lastname: First last name of the contact (optional, default is an empty string). second_lastname: Second last name of the contact (optional, default is an empty string). integration_source: Source of the integration (optional, default is an empty string). email: Email address of the contact (optional, default is an empty string). telephone: Telephone number of the contact (optional, default is an empty string). status_flag: Status of the contact (optional, default is "active" options: "archived", "active"). agent: Agent associated with the contact (optional, default is an empty string). company_name: Name of the company (optional, default is an empty string). contact_origin: Origin of the contact (optional, default is None). status_contact: Status of the contact (optional, default is None). Returns: A dictionary containing the updated contact information.
update_proposal_battery
ChatGPTUpdates an existing battery quote row with an exact quantity and pricing. offer_battery_id, cost and unit_price come from get_products_offer. cost and unit_price are required; pass their current values unless changing the pricing. margin and discount default to 0, and discount_type defaults to 1, so pass their current values when they must be preserved. Use configure_proposal_storage when the platform should size the battery quantity from the project's consumption.
update_proposal_inverter
ChatGPTUpdates one inverter row of a proposal's products offer: its quantity, whether the quantity is locked against automatic resizing, and optionally the catalog inverter it uses and its pricing (cost, margin, discount). Overwrites the row's current values and triggers the proposal's recalculation. offer_inverter_id is the row's id as returned by get_products_offer; product_branch_office is a catalog id from list_catalog_products.
update_proposal_panel
ChatGPTUpdates one panel row of a proposal's products offer: its quantity, the panels reserved as future expansion, and optionally the catalog panel it uses and its pricing (cost, margin, discount). Overwrites the row's current values and triggers the proposal's recalculation. offer_panel_id is the row's id as returned by get_products_offer; product_branch_office is a catalog id from list_catalog_products.