An abandoned checkout is created when:
A customer begins an eCommerce Checkout process but doesn't complete it (for example, after closing their browser tab before putting in their payment details and making a payment).
A customer who is also a site member creates a cart and closes their browser tab before proceeding to the checkout page. (Wix eCommerce creates an abandoned checkout entity with the cart details).
The Abandoned Checkouts API allows you to help a customer recover their abandoned checkout. When a customer completes their checkout and makes a purchase, the checkout becomes an order.
An abandoned checkout contains buyer details, prices, reference to the initial cart or checkout, a URL for accessing the abandoned checkout, and more.
The eCommerce Abandoned Checkouts API provides functionality for retrieving information about an abandoned checkout. You can also listen for events when an abandoned checkout is created and recovered.
Recovered: When a customer returns to their abandoned checkout and completes the checkout.
Activities: This property is only relevant if the Wix user set up automations in the Dashboard. The activities
property is a list of all automation activities performed by Wix Automations regarding the abandoned checkout. Wix Automations updates the activities
field for each activity in the automation flow. For example, if a Wix user set up an automation to send a notification to a site visitor an hour after their abandoned checkout is created, Wix automations does the following:
activities
field to SCHEDULED
when the abandoned checkout is created.activities
field to NOTIFICATION_SENT
after an hour, when the notification is sent to the site visitor.Other actvities
include:
EMAIL_SENT
EMAIL_NOT_SENT
TASK_CREATED
To use the AbandonedCheckouts API, install the @wix/ecom
package.
Follow the installation instructions for your development environment.
Development environment | Installation method |
---|---|
Wix sites (editor or IDE) | Use the package manager. |
Wix sites (local IDE) | Run wix install @wix/ecom` using the Wix CLI. |
Blocks apps | Use the same installation method as Wix sites. |
CLI and self-hosted apps | Run npm install @wix/ecomor yarn add @wix/ecom . |
Headless sites and apps | Run npm install @wix/ecomor yarn add @wix/ecom . |
To import the package in your code:
This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation. 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.
If a site visitor starts a checkout but doesn't complete it, you can redirect them to their checkout page. You can also check whether the site visitor has recovered their abandoned checkout and completed the purchase.
To redirect the site visitor to their checkout page:
Use onAbandonedCheckoutCreated()
to listen for when an abandoned checkout is created (a checkout was not completed).
Save the newly created abandoned checkout's ID (entityId
field) and checkoutUrl
from the above event's payload. Then send a marketing campaign with the checkoutURL
to your site visitor, redirecting them to their checkout page.
After the marketing campaign, call Get Abandoned Checkout with the abandoned checkout's ID. Then check the status
field in the response to see if the abandoned checkout has been recovered.
Deletes an abandoned checkout.
Id of the abandoned checkout to delete
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.