Cert++
Close

B2B Commerce checkout flow core actions for cart calculations

Key Takeaway

A cart calculation action needs the cart in the Checkout state, and the flow must wait until the earlier background operation is no longer New or Running before calling it.

The B2B Commerce Checkout flow runs checkout in a Commerce store. The flow comes with prebuilt core actions that you add in Flow Builder. Some of these actions recalculate the cart: repricing, promotions, shipping costs, taxes, and inventory. They take a cart ID, start the work in the background, and return the ID of that background operation. Timing and cart state matter, because a call at the wrong moment fails.

The cart calculation actions

Price Cart requests a reprice of all line items in the cart. Four more actions each request one calculation or check. You use the API name to call an action from the API.

ActionWhat it requestsAPI name
Calculate Cart PromotionsA full calculation of only the line items that have a promotioncalcCartPromotionsAction
Calculate Cart Shipment CostsThe shipping costs of all line itemscalcCartShipmentAction
Calculate Cart TaxesA tax cost calculation for all line itemscalcCartTaxesAction
Check Cart InventoryA full inventory availability check of all line itemscheckCartInventoryAction
Salesforce Accredited B2B Commerce Developer Professional Study Guide

Checklist progress

0/124Learned

Customize existing checkout flows in order to address the most common customer needs and provide an optimal Storefront experience

0/19

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Salesforce Accredited B2B Commerce Developer Professional studiers. 757 members and growing.