Nuvem Solution icon

Nuvem Solution

Interact with Nuvem Solution API

Actions120

Ordem de Serviço → Incluir Peça

AI-generated

Overview

This node integrates with the Nuvem Solution API to perform various operations related to service orders and other business resources. Specifically, for the "Ordem de Serviço" (Service Order) resource and the "Incluir Peça" (Include Part) operation, it allows users to add a part to an existing service order by sending a JSON payload describing the part details.

This functionality is useful in scenarios where a service order needs to be updated with additional parts required for repair or maintenance tasks. For example, a mechanic or service manager can automate the inclusion of parts into service orders directly from their workflow, ensuring accurate tracking and inventory management.

Practical examples:

  • Automatically adding replacement parts to a service order when a diagnostic step identifies needed components.
  • Integrating with inventory systems to include parts in service orders as they are reserved or allocated.
  • Streamlining workshop operations by programmatically updating service orders with parts information.

Properties

Name Meaning
Request Body JSON body for the request. This should contain the details of the part to be included in the service order. The JSON structure depends on the API's expected format for including a part.

Output

The node outputs the JSON response returned by the Nuvem Solution API after attempting to include the part in the service order. This typically contains confirmation details such as the created part record, status messages, or error information if the operation failed.

The output is structured as a JSON object reflecting the API response. There is no binary data output for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Nuvem Solution API.
  • The node uses bearer token authentication obtained via the configured credentials.
  • The base URL for the API and authentication tokens are managed internally.
  • The user must provide valid JSON in the "Request Body" property matching the API specification for including a part in a service order.

Troubleshooting

  • Invalid JSON in Request Body: If the JSON provided in the "Request Body" field is malformed, the API call will fail. Ensure the JSON syntax is correct before executing the node.
  • Authentication Errors: If the API credentials are incorrect or expired, the node will throw authentication errors. Verify that the API key and other credentials are valid and have not expired.
  • Unsupported Operation Error: If the operation name is misspelled or not supported, the node will throw an error indicating the operation is not supported.
  • API Response Errors: The API may return errors due to invalid data, missing required fields, or business logic constraints. Review the API response message for details and adjust the request accordingly.

Links and References


Summary of execute() method logic for Resource "ordemServico" and Operation "incluirPeca":

  • Reads input items.
  • Retrieves API credentials and obtains an access token.
  • For each input item:
    • Checks if resource is "ordemServico" and operation is "incluirPeca".
    • Parses the "requestBody" parameter as JSON.
    • Sends a POST request to the endpoint /erp/oficina/ordensServico/peca with the parsed JSON body.
    • Collects the API response.
  • Returns all responses as JSON array output.

This design enables batch processing of multiple parts inclusion requests in one execution.

Discussion