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

  1. A site visitor adds an item to the cart.
  2. Using the Cart Created Webhook, listen for an event when a cart is created.
Copy

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.

  1. 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:

    Copy

    The response is the cart object containing the newly added buyer note.

  2. Use Remove Coupon to remove a coupon from a cart.

    Copy
Was this helpful?
Yes
No