Sample Flows
This article shares some possible use cases your app could support, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but they can be a helpful jumping off point as you plan your app's implementation.
Listen for a cart created by a site visitor
- A site visitor adds an item to the cart.
- Using the Cart Created Webhook, listen for an event when a cart is created.
Copy
1
Save the newly created cart's ID (entityId
field in the above webhook's payload) for use in the flow below.
Update a cart
If a store owner wants to update a specific cart with a buyer note and remove a coupon, they can follow this basic flow.
-
Pass the cart's ID (
entityId
field in the above webhook's payload) to the Update Cart endpoint to add a buyer note to the cart:Copy1The response is the cart object containing the newly added buyer note.
-
Use Remove Coupon to remove a coupon from a cart.
Copy1
Was this helpful?
Yes
No