You can change the pricing of products using the following flags at the template level:
The Digital Commerce SDK consists of the following flag to change pricing. These flags are available in the environment file.
|skipPricing||By default, this flag is set to True. When the user changes an existing cart, Digital Commerce skips pricing meaning pricing still runs in the background making another network call, thus scalable to large carts. Setting this flag to False allows Digital Commerce to perform pricing when the user changes an existing cart, meaning all CRUD operations such as update quantity, delete a line item, data change along with pricing on the cart are performed in a single network call. This is ideal for a cart with up to 50 line items. For more than 50 line items, it is recommended you set the skipPricing flag to True.|
|skipRules||By default, this flag is set to False. When the user changes an existing cart, Digital Commerce evaluates the rules. Setting this flag to True skips rules when the user changes an existing cart.|
You may use these flags with the following combinations to allow Digital Commerce to make changes to the cart with or without pricing parameters.
- skipPricing = True and skipRules = False
- skipPricing = False and skipRules = True
- skipPricing = False and skipRules = False
You can set up a pricing fallback when TurboPricing fails. The following flag is available in the environment file.
|pricingFallback||By default, this flag is set to False. When TurboPricing fails, an error message is displayed without any further action. Setting this flag to True enables the system to use CPQ pricing.|
You can also set up a pricing retry mechanism if you want further action when the TurboPricing or CPQ Pricing fails. When pricing fails a pop-up appears with the Retry and Clear Cart buttons.
When the user clicks Retry, Digital Commerce performs pricing again; when the user clicks Clear Cart, Digital Commerce clears the cart if you do not want it to perform repricing. If the user moves away from the pop-up without performing any action, these buttons are still available in the top bar of the Catalog, Product details, and View Cart pages.