Manage Buying Configurations

Buying Experience provides a standardized mechanism for all the runtime configurations required by Buying services.

Overview

Buying configuration APIs help you to enable or disable outbound events, update abandoned cart settings, configure template placeholder mappings, and the template document metadata.

Manage Configurations

You can manage the buying runtime configurations by retrieving details using the configuration API. You can get all the available configuration details using this API.

Here's how you can get the configuration details:

  • To get the configuration details, run the following cURL command or use a REST API client:
        curl -H Authorization: Bearer <accessToken> https://<hostName>/cx/industry/buying/configManagement/v1/configurations -X GET
  • To get the configuration details for a specific configuration, run the following cURL command or use a REST API client:
        curl -H Authorization: Bearer <accessToken> https://<hostName>/cx/industry/buying/configManagement/v1/configurations/{configurationId} -X GET

Insert Inventory Configuration

Here's how you insert or update the global threshold configuration for inventory:
  1. Create a payload for specifying the global threshold for all the SKU and channel combinations with details described in this table:

    Table

    Field Description
    id Configuration Id
    name The valid value is "Inventory Configuration".
    configuration List of configurations.
    type The valid values are:
    • Regular
    • Preorder
    threshold Global threshold value
    safeLimit Global safe limit value
    individualThreshold List of individual thresholds.
    skuNumber SKU number
    channelCode Channel Code
    threshold threshold value
    safeLimit safe limit value
  2. Call the configuration API by running this cURL command or by using a REST API client:
    curl -H Authorization: Bearer <accessToken> https://<hostName>/cx/industry/buying/configManagement/v1/configuration/inventoryConfig -X POST -H "Content-Type: application/json" -d @sc-data.json

    where

    • <accessToken> is the OAuth access token for Back Office Specialist role.
    • <hostName> is the URL for the CX Industries Framework API Gateway.
    Response Body:
    {
        "id": "6",
        "name": "Inventory Operations",
        "configuration": [
            {
                "type": "regular",
                "threshold": 8,
                "safeLimit": 7,
                "individualThreshold": [
                    {
                        "skuNumber": "HH01-R6260-71-A",
                        "channelCode": "10000",
                        "threshold": 10,
                        "safeLimit": 10
                    }
                ]
            },
            {
                "type": "preorder",
                "threshold": 8,
                "safeLimit": 7,
                "individualThreshold": [
                    {
                        "skuNumber": "HH01-R6260-71-A",
                        "channelCode": "10000",
                        "threshold": 10,
                        "safeLimit": 10
                    }
                ]
            }
        ]
    }

How to Enable or Disable Outbound Events

You can enable or disable publishing for a specific outbound event by using the configuration API. With this option, you can publish only the outbound events that are needed for your business scenarios.

Here's how you enable or disable publishing for an outbound event:

  1. Create a payload for specifying whether an event is publishable with the details described in this table.
    Field Description
    id Unique id
    name "Events"
    configuration List of configuration objects.
    name

    The name of the event to be enabled or disabled.

    enabled

    Specify whether this event is publishable. The valid values are:

    • FALSE: The specified event isn't published to the listeners.

    • TRUE: The specified event is published to the listeners.

    groupName Group to which this event belongs to.
  2. Call the configuration API by running this cURL command or by using a REST API client:
    curl -H Authorization: Bearer <accessToken> https://<hostName>/cx/industry/buying/configManagement/v1/outboundConfig-X PUT -H "Content-Type: application/json" -d @sc-data.json
    where:
    • <accessToken> is the OAuth access token for Back Office Specialist role.

    • <hostName> is the URL for the CX Industries Framework API Gateway.

    The API returns a response if the duration is updated.

    Sample request payload:
    {
        "id": "1",
        "href": "https://cptadceqy-buy-cluster4.dxbuying.ocs.oraclecloud.com/orch9f35cbf4/cx/industry/buying/configManagement/v1/internal/configuration/outboundConfig/1",
        "name": "Events",
        "@type": "OracleOutboundConfiguration",
        "configuration": [
            {
                "name": "ThresholdBreachRegularEvent",
                "enabled": true,
                "groupName": "individual",
                "@type": "OracleOutboundConfiguration"
            }
        ]
    }

How to Update Abandoned Cart, Shopping Cart and User Expiry Duration

Here's how you update the abandoned cart or purge cart or user expiry duration:

  1. Create a payload for specifying the duration with the details described in this table.

    Field Description
    id Unique id
    name "Buying Configurations"
    configuration List of configuration objects.
    name

    The name of the event to be enabled or disabled.

    duration duration
    uom Unit of measure
  2. Call the configuration API by running this cURL command or by using a REST API client:
    curl -H Authorization: Bearer <accessToken> https://<hostName>/cx/industry/buying/configManagement/v1/buyingConfig-X PUT -H "Content-Type: application/json" -d @sc-data.json

    Where:

    • <accessToken> is the OAuth access token for Back Office Specialist role.

    • <hostName> is the URL for the CX Industries Framework API Gateway.

The API returns a response if the duration is updated.

Here's a sample request payload:
{
    "name": "Buying Operations",
    "configuration": [
        {
            "name": "shoppingCartAbondenment",
            "duration": 12,
            "uom": "month"
        },
        {
            "name": "shoppingCartPurge",
            "duration": 20,
            "uom": "days"
        },
        {
            "name": "shoppingCartExpiry",
            "duration": 48,
            "uom": "weeks"
        },
        {
            "name": "userRegistrationExpiry",
            "duration": 48,
            "uom": "hours"
        }
    ]
}