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:

Sample Payload

{
  "PricingCircuitMaxRetries": "5",
  "PricingCircuitDelay": "300"
}
C#

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

Set the value for the cartRetryLimit and cartRetryDelay parameters available in the environment.ts file. To set these parameters, see Configuring Templates.

The application uses the following precedence to determine the retry and delay values for fetching cart status:

  1. Config System Properties
  2. 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 takes longer than expected, the application attempts to fetch the cart status again for the number of retry attempts and inter-attempt delay specified in the cart status retry settings. If pricing the cart takes longer, these options are presented:

  • Check Status: The application will attempt to fetch the cart status again, doubling the number of retry attempts specified while configuring cart status retry settings. For example, if you set 5 retry attempts, the application will attempt 10 retries.
  • Abandon Cart: Deactivates the current cart and creates a new one. You can then add the products again into the new cart.