Salesforce OpenCommerce API icon

Salesforce OpenCommerce API

OCAPI for Salesforce Commerce Cloud

Get Order

AI-generated

Overview

This n8n node allows you to interact with the Salesforce Commerce Cloud (SFCC) Open Commerce API (OCAPI). Specifically, when using the Default resource and the Get Order operation, the node retrieves detailed information about a specific order from an SFCC site by its order number. This is useful for automating workflows that require access to order data, such as customer support processes, order tracking, or integration with other systems.

Example scenarios:

  • Fetching order details to send confirmation emails.
  • Retrieving order information for analytics or reporting.
  • Integrating SFCC order data into ERP or CRM systems.

Properties

Name Type Meaning
Site ID String The SFCC site identifier (e.g., "SiteGenesis") where the order resides.
Order Number String The unique order number to retrieve from the specified SFCC site.

Output

The node outputs a json object containing the order details as returned by the Salesforce OCAPI. The structure of this object depends on the SFCC API response for the requested order, but typically includes fields such as order number, status, customer information, items, totals, and shipping details.

Example output:

{
  "order_no": "00012345",
  "status": "NEW",
  "customer_info": {
    "email": "customer@example.com"
  },
  "product_items": [
    {
      "product_id": "SKU123",
      "quantity": 2,
      "price": 29.99
    }
  ],
  "totals": {
    "grand_total": 59.98
  },
  // ...other order fields
}

Note: The actual fields depend on your SFCC configuration and OCAPI version.

Dependencies

  • External Service: Requires access to a Salesforce Commerce Cloud instance with OCAPI enabled.
  • Credentials: Needs valid n8n credentials for "salesforceOcapi" including:
    • Client ID
    • Client Secret
    • Hostname
    • API Version
  • n8n Configuration: Ensure the "salesforceOcapi" credential is set up in your n8n instance.

Troubleshooting

  • Invalid Credentials: If the provided credentials are incorrect or lack permissions, the node will fail to connect to SFCC. Double-check your client ID, secret, and hostname.
  • Order Not Found: If the specified order number does not exist, the API may return an error or empty result. Verify the order number and site ID.
  • API Errors: Common errors include authentication failures, permission issues, or exceeding API rate limits. Review the error message for specifics and consult your SFCC admin if needed.
  • Malformed Input: Supplying an invalid or empty order number will cause the node to throw an error. Ensure all required fields are filled.

Links and References

Discussion