CloudBlue Commerce SimpleAPI icon

CloudBlue Commerce SimpleAPI

Interact with CloudBlue Commerce SimpleAPI

Overview

The node is designed to update special pricing details for products within a subscription. It allows users to specify one or more products and set custom pricing, costs, and provider costs on a per-product basis. This is useful in scenarios where subscription pricing needs to be adjusted dynamically based on negotiated deals, promotions, or updated cost structures.

Practical examples include:

  • Adjusting the unit price of specific products in a customer's subscription after a discount agreement.
  • Updating the cost and provider cost information for internal accounting or margin calculations.
  • Managing complex subscriptions with multiple products requiring individualized pricing updates.

Properties

Name Meaning
Subscription ID The unique identifier of the subscription to update.
Special Pricing A collection of product-specific pricing data to update.
- Products List of products to update pricing for. Each product includes:
-- Product One or more products (multiple values allowed), each with:
--- MPN Manufacturer Part Number identifying the product.
--- ID Product ID used internally to identify the product.
--- Unit Price The new unit price for the product, specified as a currency code (e.g., USD) and amount.
--- Unit Cost The new unit cost for the product, specified as a currency code and amount.
--- Unit Provider Cost The new unit provider cost for the product, specified as a currency code and amount.

Output

The output JSON contains the result of the update operation for each input item. Typically, this will include confirmation of the updated subscription pricing or any relevant response from the API indicating success or failure.

If the node supports binary data output, it would represent related files or attachments, but based on the provided code and properties, the output focuses on JSON data reflecting the update results.

Dependencies

  • Requires an initialized API service client configured with appropriate credentials (such as an API key or authentication token) to communicate with the backend system managing subscriptions.
  • The node depends on a resource registry that manages available resources and their operations.
  • Proper configuration of the API connection in n8n is necessary for successful execution.

Troubleshooting

  • Common issues:

    • Invalid or missing Subscription ID can cause the update to fail.
    • Incorrectly formatted pricing data (e.g., missing currency codes or amounts) may lead to validation errors.
    • Network or authentication failures if API credentials are not properly set up.
  • Error messages:

    • "Resource Subscription not found or not yet migrated" indicates the resource is unavailable or misconfigured.
    • Errors mentioning missing required fields like Subscription ID or currency/amount in pricing indicate incomplete input.
    • General API errors will be returned as error messages in the output JSON; reviewing these messages helps identify issues.
  • Resolution tips:

    • Ensure all required fields are filled correctly.
    • Verify API credentials and network connectivity.
    • Use the "Continue On Fail" option to handle partial failures gracefully.

Links and References

  • No direct external links provided in the source code.
  • For further details, consult the API documentation of the subscription management system integrated with this node.
  • Refer to n8n documentation on creating and configuring custom nodes and handling fixed collections for complex inputs.

Discussion