SAP B1 Service Layer 3 - CRM icon

SAP B1 Service Layer 3 - CRM

Interact with SAP B1 Service Layer 3 - CRM

Overview

This node interacts with the SAP Business One Service Layer 3 CRM API to perform various operations on CRM resources such as Orders, Quotations, Business Partners, Activities, and Sales Opportunities. Specifically for the Order resource and the Close operation, it sends a request to close an existing order identified by its key (DocEntry). This is useful in business workflows where an order lifecycle needs to be programmatically managed, for example, marking an order as completed or finalized after shipment or payment.

Practical examples:

  • Automatically closing orders once all items are shipped.
  • Integrating order status updates from external systems into SAP B1.
  • Batch processing of multiple orders to close them at once.

Properties

Name Meaning
DocEntry / Key The unique identifier (key) of the order to be closed. This is required to specify which order to close.

Output

The node outputs JSON data representing the response from the SAP B1 Service Layer API after attempting to close the specified order. The structure typically contains details about the success or failure of the operation, including any updated order information or error messages.

If the operation fails, the output JSON will contain an error field with the error message.

No binary data output is produced by this node.

Dependencies

  • Requires connection credentials to the SAP Business One Service Layer API, including:
    • Base URL of the SAP B1 Service Layer.
    • Username and password for authentication.
    • Company database name.
  • The node performs a login request to obtain session cookies used for subsequent API calls.
  • The node uses HTTP requests to interact with the SAP B1 REST endpoints.
  • No additional external libraries beyond n8n's built-in HTTP request helper are needed.

Troubleshooting

  • Authentication errors: If login fails, verify that the base URL, username, password, and company database are correct and that the SAP B1 Service Layer is accessible.
  • Invalid DocEntry: If the provided order key does not exist or is incorrect, the API will return an error. Ensure the DocEntry matches an existing order.
  • Permission issues: The user account must have sufficient permissions to close orders in SAP B1.
  • Network issues: Connection problems or SSL certificate issues may cause request failures. The node disables strict SSL verification (rejectUnauthorized: false) but network connectivity must still be ensured.
  • API endpoint changes: If SAP B1 Service Layer API versions change, the node’s hardcoded paths might need updating.

Common error messages:

  • "401 Unauthorized": Authentication failed; check credentials.
  • "404 Not Found": The specified order key does not exist.
  • Error messages returned in the error field of the output JSON provide clues for resolution.

Links and References

Discussion