Configure Cart Pricing Status Retry Settings
This topic explains how to configure the retry attempts and delay settings for cart pricing calculations within the application, including the use of config system properties, environment.ts file settings, and default SDK values.
When a user adds a product to the cart, the application calculates the cart's pricing. If pricing fails, you can configure the following settings to specify the number of times the application will fetch the active cart's status and the delay between each attempt until pricing completes.
Config System Properties
Use the PUT https://<URL_of_the_Instance>/api/revenue-admin/v1/flows/system/settings/ConfigSystemProperties API and set the PricingCircuitMaxRetries and PricingCircuitDelay flags.
- PricingCircuitMaxRetries: controls the maximum number of retry attempts for fetching the active cart's status.
- PricingCircuitDelay: sets the delay between retries to fetch pricing status.
Refer to the following sample payload for 5 retries with a 300 millisecond retry interval:
{
"PricingCircuitMaxRetries": "5",
"PricingCircuitDelay": "300"
} To retrieve the flag settings, use the following API:
GET https://<URL_of_the_Instance>/api/revenue-admin/v1/flows/system/settings/ConfigSystemProperties
environment.ts File Setup
You can set the value for the cartRetryLimit and cartRetryDelay parameters available in the environment.ts file. To set these parameters, see Configure Templates.
The application uses the following precedence to determine the retry and delay values for fetching cart status:
- Config System Properties
- environment.ts File
For example, if you have only set the PricingCircuitMaxRetries flag in the Config System Properties, the application uses the delay value set in the cartRetryDelay parameter in the environment.ts file.
If none of the above settings is configured, the application uses the default values (5 retry attempts with a 500-millisecond delay) from the SDK. For more information see SDK Reference.
If the price process of the cart has timed out after configuring the product from the product details page, the system will try pricing again for the number of times you specified when configuring the template. If the pricing process is still pending, you will see an error message with three options:
- Retry: The system will retry the pricing for the number of times you specify while configuring the template.
- Clone: The system will clone the cart, mark the new cart as active, and then run the price when any action is taken on the new active cart.
- Abandon: The current cart will be deactivated and a new cart will be created by the system.
