Change Site Settings
When you develop the application locally, you might need to change some of the following required site settings:
-
dx4cBuyingUrl
: The CX Industries Framework server URL to connect to the Buying Experience REST APIs. -
dx4cBillingUrl
: The CX Industries Framework server URL to connect to the Billing REST APIs. -
dx4cSSEUrl
: The URL to connect to the Oracle Identity Cloud Service Server-Side Extension (dx4c-idcs-sse). Leave it blank to connect to the default Server-Side Extension. -
dx4cGeoLocationSSEUrl
: The URL to connect to the geographic location server-side extension. Leave it blank to connect to the default geographic location server-side extension. -
dx4cPaymentMSUrl
: The URL to connect to your payment gateway. If left blank, the storefront payment components aren't visible to the users and the payment endpoints aren't called. -
dx4cSupportNumber
: The support number you want to display to users when an error occurs. -
dx4cDefaultPriceListName
: The default price list name to use for communications products. The default value is DX4C NA Pricelist. -
dx4cOdaEnabled
: The parameter to enable or disable Oracle Digital Assistant. By default, this value is set to false (disabled). -
dx4cOdaUrl
: The URL for the Digital Assistant instance. -
dx4cOdaChannelId
: The channel ID for the Digital Assistant instance. -
dx4cEligibilityProfileCountry
: The default country to be used if the customer's location can't be detected, or the customer's location isn't part of the list of supported countries. -
dx4cEligibilityProfileZipCode
: The default ZIP code to be used if the customer's ZIP code can't be detected, or the customer's location isn't part of the list of supported countries. -
dx4cSupportedLocations
: A comma-separated list of countries that are used to validate the automatically detected eligibility profile country. -
dx4cOCEUrl
: The URL for the Oracle Content and Experience Cloud instance. -
dx4cOCEChannelToken
: The token to access the content published on the Oracle Content and Experience Cloud channel.
These settings are configurable parameters that are globally accessible to the communications storefront and self-care components. Review all the settings to verify that it has appropriate values.
Here's how you can update the settings in the Oracle Commerce Cloud administration console:
-
In the OCC administration console, navigate to Settings > Extension Settings > DX4C Store Site Settings.
-
Update the site settings as needed.
-
Click Save and then Publish.
You can also update the settings in the packages/apps/dx4c-store/.occ/config.js file manually. Here's a sample site setting configuration:
module.exports = {
"renderToString": true,
"appContext": {
"default": {
"configRepositoryState": {
"dx4cConfig": {
"dx4cBuyingUrl": "http://<Industries_Framework_server_url>/api/01",
"dx4cBillingUrl": "http://<Industries_Framework_server_url>/api/01",
"dx4cSSEUrl": "",
"dx4cGeoLocationSSEUrl": "",
"dx4cPaymentMSUrl": "",
"dx4cOceUrl": "https://<oce-instance>",
"dx4cOceChannelToken": "<oce-channel-token>",
"dx4cDefaultPriceListName": "DX4C NA Pricelist",
"dx4cOdaEnabled": false,
"dx4cOdaUrl": "",
"dx4cOdaChannelId": "",
"dx4cEligibilityProfileCountry": "US",
"dx4cEligibilityProfileZipCode": "",
"dx4cSupportedLocations": "US,CA"
}
}
},
"test": {
"configRepositoryState": {
"dx4cConfig": {
"dx4cBuyingUrl": "http://<Industries_Framework_server_url>/api/01",
"dx4cBillingUrl": "http://<Industries_Framework_server_url>/api/01",
"dx4cSSEUrl": "",
"dx4cGeoLocationSSEUrl": "",
"dx4cPaymentMSUrl": "",
"dx4cOceUrl": "https://<oce-instance>",
"dx4cOceChannelToken": "<oce-channel-token>",
"dx4cDefaultPriceListName": "DX4C NA Pricelist",
"dx4cOdaEnabled": false,
"dx4cOdaUrl": "",
"dx4cOdaChannelId": "",
"dx4cEligibilityProfileCountry": "US",
"dx4cEligibilityProfileZipCode": "",
"dx4cSupportedLocations": "US,CA"
}
}
}
}
When you start the application using the command yarn start, the application uses the configuration values specified in the site settings. If you want to override these values, you can append the --appContext parameter to the yarn start command. For example, if you want to use the values for the test configuration as shown in the sample, you have to run the following command:
yarn start --appContext test
You can override the configuration only for local development applications. When the application is running on a deployed server, it always uses the values configured in the communications store site settings extension in the Oracle CX Commerce admin console.
When you create widgets for the application, you want to configure the settings for it to display your site. To add new site settings for your widgets, refer to the Add Site Settings topic in the Oracle CX Commerce Developing Widgets guide.
How to Set Channel Token
You must set the DX4C OCE channel token as a post deployment step for retrieving Oracle Content and Experience Cloud images. Review and follow steps available in the Channel Token and Authentication chapter of the REST API for Content Delivery guide.
- Run GET request: https://Content Management
URL/content/management/api/v1.1/channels
In the response body, user will get the channel ID, for example: RCHANNEL0E38831154DF4D848CED28979824F2D4
- Run GET request: https://Content Management
URL/content/management/api/v1.1/channels/<ID>, for example: https://Content Management
URL/content/management/api/v1.1/channels/RCHANNEL0E38831154DF4D848CED28979824F2D4
In the response body, user will get "channelTokens.token", for example: "efe506cee46d451bb31d1c36e12e5b71"
- In the OCC administration console, navigate to Settings > Extension Settings > DX4C Store Site Settings.
- Enter the DX4C OCE channel token and save it.