When a contact places an order and their account is configured to use an external service to determine whether approval is required, the server first invokes the Order Approvals function webhook. The webhook sends the following data to the external system:

To send this data to the external system, you configure the webhook by specifying the URL, username, and password for accessing the system. (See Configure webhooks for details.) You must also configure the external system to read the request data, determine whether the order requires approval, and send a response that includes the following items:

  • The key approvalAction, whose value must be either true (the order requires approval) or false (the order does not require approval).

  • The key approvalActionReason, whose value is a string that describes the reason approval is required if approvalAction is true. Commerce Cloud adds this string to the order’s properties and displays it in layouts and emails related to orders and approvals. See Configure page layouts for order approvals for details about layouts where this string can appear. See Notify users of order approval-related events in Using Oracle Commerce Cloud for details about emails where this string can appear.

    If approvalAction is true but approvalActionReason is missing, empty, or contains a null string, Commerce Cloud uses the string Reason unavailable.

For example, if the order requires approval because some of the products ordered are part of a specific collection, the response body might be:

{
    "approvalAction": true,
    "approvalActionReason": "Contains restricted items"
}

If Commerce Cloud cannot connect to the external system, for example in the event of an outage, or if the approvalAction key is missing, null, or contains an invalid value, the order is sent for approval. Approvers are notified, via the Order Pending For Approval email, that the order requires approval because the external system could not be reached.


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices