> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Package: checkout # Namespace: abandonedCheckout # Webhook link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/purchase-flow/checkout/abandoned-checkout/abandoned-checkout-updated.md ## Introduction Triggered when an abandoned checkout is updated. --- ## REST API ### Schema ``` Webhook: Abandoned Checkout Updated Description: Triggered when an abandoned checkout is updated. Event body: - name: id | type: string | description: Unique event ID. Allows clients to ignore duplicate events. - name: entityFqdn | type: string | description: Fully qualified domain name of the entity associated with the event. - name: slug | type: string | description: Event name. - name: entityId | type: string | description: ID of the entity associated with the event. - name: eventTime | type: string (date-time) | description: Event timestamp. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application such as GDPR. - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: updatedEvent | type: object | description: Updated event details. - name: currentEntity | type: AbandonedCheckout | description: The entity after the update. - name: id | type: string | description: Abandoned checkout GUID. - name: createdDate | type: string | description: Date and time the abandoned checkout was created. - name: updatedDate | type: string | description: Date and time the abandoned checkout was updated. - name: checkoutId | type: string | description: The associated checkout GUID. - name: cartId | type: string | description: The associated cart GUID. - name: status | type: Status | description: Status of the abandoned checkout. - enum: - ABANDONED: Abandoned. - RECOVERED: Recovered. - name: buyerLanguage | type: string | description: Language for communication with the buyer. Defaults to the site language. For a site that supports multiple languages, this is the language the buyer selected. - name: buyerInfo | type: BuyerInfo | description: Buyer information. - ONE-OF: - name: visitorId | type: string | description: Visitor GUID (if the site visitor is **not** a site member). - name: memberId | type: string | description: Member GUID (if the site visitor is a site member). - name: userId | type: string | description: User GUID (if the site visitor is a site owner or collaborator). - name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API. - name: email | type: string | description: Buyer email address. - name: contactDetails | type: FullAddressContactDetails | description: Contact details. - name: firstName | type: string | description: First name. - name: lastName | type: string | description: Last name. - name: phone | type: string | description: Phone number. - name: company | type: string | description: Company name. - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. - name: id | type: string | description: Customer's tax GUID. - name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations - enum: - UNSPECIFIED: - CPF: CPF - for individual tax payers. - CNPJ: CNPJ - for corporations - name: currency | type: string | description: The store's currency. - name: conversionCurrency | type: string | description: Currency the buyer used in checkout. - name: totalPrice | type: MultiCurrencyPrice | description: Total price after discounts, gift cards, and tax. - name: amount | type: string | description: Amount. - name: convertedAmount | type: string | description: Converted amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol. - name: activities | type: array | description: List of all automation activities performed by [Wix Automations](https://dev.wix.com/docs/rest/business-management/automations/introduction.md) regarding the abandoned checkout. Wix Automations updates the `activities` field for each activity in the automation flow. Only relevant if the site owner set up [automations in the Dashboard](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-1-create-a-new-automation). Read more about `activities` in the Abandoned Checkouts introduction. - name: createdDate | type: string | description: Date and time the automation activity was created. - name: type | type: ActivityType | description: Automation activity type. - enum: - SCHEDULED: Scheduled. - EMAIL_SENT: Email sent. - EMAIL_NOT_SENT: Email not sent. - NOTIFICATION_SENT: Notification sent. - TASK_CREATED: Task created. - AUTOMATION_SKIPPED: Automation skipped. - name: checkoutRecoveredDate | type: string | description: Date and time the abandoned checkout was recovered. - name: checkoutUrl | type: string | description: Checkout URL. - name: subtotalPrice | type: MultiCurrencyPrice | description: Subtotal price of all line items, before discounts and before tax. - name: lineItems | type: array | description: Line items. - name: id | type: string | description: Line item GUID. - name: quantity | type: integer | description: Item quantity. - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Holds GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. - name: appId | type: string | description: GUID of the app providing the catalog. You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` - name: options | type: object | description: Additional item details in `key:value` pairs. Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items. For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md). - name: productName | type: ProductName | description: Item name. + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name` - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: Item name translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: price | type: MultiCurrencyPrice | description: Item price **after** catalog-defined discount and line item discounts. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. - name: descriptionLines | type: array | description: Line item description lines. Used for displaying the cart, checkout and order. - ONE-OF: - name: plainText | type: PlainTextValue | description: Description line plain text value. - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line plain text value translated into the buyer's language. Default: Same as `original`. - name: colorInfo | type: Color | description: Description line color value. - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line color name translated into the buyer's language. Default: Same as `original`. - name: code | type: string | description: HEX or RGB color code for display. - name: name | type: DescriptionLineName | description: Description line name. - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line name translated into the buyer's language. Default: Same as `original`. - name: image | type: Image | description: Line item image details. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). - name: shippable | type: boolean | description: Whether this line item is shippable. - name: appliedDiscounts | type: array | description: Applied discounts. - ONE-OF: - name: coupon | type: Coupon | description: Coupon details. - name: id | type: string | description: Coupon GUID. - name: code | type: string | description: Coupon code. - name: amount | type: MultiCurrencyPrice | description: Coupon value. - name: name | type: string | description: Coupon name. - name: merchantDiscount | type: MerchantDiscount | description: Merchant discount. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: percentage | type: number | description: Discount Percentage. Will be calculated from items price before other discounts. - name: discountRule | type: DiscountRule | description: Discount rule - name: id | type: string | description: Discount rule GUID - name: name | type: DiscountRuleName | description: Discount rule name - name: original | type: string | description: Original discount rule name (in site's default language). - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: discountType | type: DiscountType | description: Discount type. - enum: GLOBAL, SPECIFIC_ITEMS, SHIPPING - name: lineItemIds | type: array | description: IDs of line items the discount applies to. ``` --- ## JavaScript SDK ### Schema ``` Webhook: onAbandonedCheckoutUpdated Description: Triggered when an abandoned checkout is updated. Payload: AbandonedCheckoutUpdatedEnvelope - name: entity | type: AbandonedCheckout | description: none - name: _id | type: string | description: Abandoned checkout GUID. - name: _createdDate | type: Date | description: Date and time the abandoned checkout was created. - name: _updatedDate | type: Date | description: Date and time the abandoned checkout was updated. - name: checkoutId | type: string | description: The associated checkout GUID. - name: cartId | type: string | description: The associated cart GUID. - name: status | type: Status | description: Status of the abandoned checkout. - enum: - ABANDONED: Abandoned. - RECOVERED: Recovered. - name: buyerLanguage | type: string | description: Language for communication with the buyer. Defaults to the site language. For a site that supports multiple languages, this is the language the buyer selected. - name: buyerInfo | type: BuyerInfo | description: Buyer information. - ONE-OF: - name: visitorId | type: string | description: Visitor GUID (if the site visitor is **not** a site member). - name: memberId | type: string | description: Member GUID (if the site visitor is a site member). - name: userId | type: string | description: User GUID (if the site visitor is a site owner or collaborator). - name: contactId | type: string | description: Contact GUID. For more information, see the Contacts API. - name: email | type: string | description: Buyer email address. - name: contactDetails | type: FullAddressContactDetails | description: Contact details. - name: firstName | type: string | description: First name. - name: lastName | type: string | description: Last name. - name: phone | type: string | description: Phone number. - name: company | type: string | description: Company name. - name: vatId | type: VatId | description: Tax information (for Brazil only). If GUID is provided, `vatId.type` must also be set, `UNSPECIFIED` is not allowed. - name: _id | type: string | description: Customer's tax GUID. - name: type | type: VatType | description: Tax type. Supported values: + `CPF`: for individual tax payers + `CNPJ`: for corporations - enum: - UNSPECIFIED: - CPF: CPF - for individual tax payers. - CNPJ: CNPJ - for corporations - name: currency | type: string | description: The store's currency. - name: conversionCurrency | type: string | description: Currency the buyer used in checkout. - name: totalPrice | type: MultiCurrencyPrice | description: Total price after discounts, gift cards, and tax. - name: amount | type: string | description: Amount. - name: convertedAmount | type: string | description: Converted amount. - name: formattedAmount | type: string | description: Amount formatted with currency symbol. - name: formattedConvertedAmount | type: string | description: Converted amount formatted with currency symbol. - name: activities | type: array | description: List of all automation activities performed by [Wix Automations](https://dev.wix.com/docs/rest/business-management/automations/introduction.md) regarding the abandoned checkout. Wix Automations updates the `activities` field for each activity in the automation flow. Only relevant if the site owner set up [automations in the Dashboard](https://support.wix.com/en/article/wix-automations-creating-an-automation-with-the-new-builder#step-1-create-a-new-automation). Read more about `activities` in the Abandoned Checkouts introduction. - name: _createdDate | type: Date | description: Date and time the automation activity was created. - name: type | type: ActivityType | description: Automation activity type. - enum: - SCHEDULED: Scheduled. - EMAIL_SENT: Email sent. - EMAIL_NOT_SENT: Email not sent. - NOTIFICATION_SENT: Notification sent. - TASK_CREATED: Task created. - AUTOMATION_SKIPPED: Automation skipped. - name: checkoutRecoveredDate | type: Date | description: Date and time the abandoned checkout was recovered. - name: checkoutUrl | type: string | description: Checkout URL. - name: subtotalPrice | type: MultiCurrencyPrice | description: Subtotal price of all line items, before discounts and before tax. - name: lineItems | type: array | description: Line items. - name: _id | type: string | description: Line item GUID. - name: quantity | type: integer | description: Item quantity. - name: catalogReference | type: CatalogReference | description: Catalog and item reference. Holds GUIDs for the item and the catalog it came from, as well as further optional info. Optional for custom line items, which don't trigger the Catalog service plugin. - name: catalogItemId | type: string | description: GUID of the item within the catalog it belongs to. - name: appId | type: string | description: GUID of the app providing the catalog. You can get your app's GUID from its page in the [app dashboard](https://dev.wix.com/dc3/my-apps/). For items from Wix catalogs, the following values always apply: + Wix Stores: `"215238eb-22a5-4c36-9e7b-e7c08025e04e"` + Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"` + Wix Restaurants: `"9a5d83fd-8570-482e-81ab-cfa88942ee60"` - name: options | type: object | description: Additional item details in `key:value` pairs. Use this optional field for more specificity with item selection. The values of the `options` field differ depending on which catalog is providing the items. For Wix Stores products, learn more about integrating with [Catalog V3](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v3/e-commerce-integration.md) or [Catalog V1](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-v1/catalog/e-commerce-integration.md), depending on [the version the site uses](https://dev.wix.com/docs/api-reference/business-solutions/stores/catalog-versioning/introduction.md). - name: productName | type: ProductName | description: Item name. + Stores - `product.name` + Bookings - `service.info.name` + Events - `ticket.name` - name: original | type: string | description: __Required.__ Item name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). Min: 1 character. Max: 200 characters. - name: translated | type: string | description: Item name translated into the buyer's language. Min: 1 character. Max: 400 characters. Default: Same as `original`. - name: price | type: MultiCurrencyPrice | description: Item price **after** catalog-defined discount and line item discounts. - name: priceBeforeDiscounts | type: MultiCurrencyPrice | description: Item price **before** line item discounts and **after** catalog-defined discount. Defaults to `price` when not provided. - name: descriptionLines | type: array | description: Line item description lines. Used for displaying the cart, checkout and order. - ONE-OF: - name: plainText | type: PlainTextValue | description: Description line plain text value. - name: original | type: string | description: Description line plain text value in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line plain text value translated into the buyer's language. Default: Same as `original`. - name: colorInfo | type: Color | description: Description line color value. - name: original | type: string | description: Description line color name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line color name translated into the buyer's language. Default: Same as `original`. - name: code | type: string | description: HEX or RGB color code for display. - name: name | type: DescriptionLineName | description: Description line name. - name: original | type: string | description: Description line name in the site's default language as defined in the [request envelope](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/self-hosting/supported-extensions/backend-extensions/add-self-hosted-service-plugin-extensions.md#request-envelope). - name: translated | type: string | description: Description line name translated into the buyer's language. Default: Same as `original`. - name: image | type: string | description: Line item image details. - name: physicalProperties | type: PhysicalProperties | description: Physical properties of the item. When relevant, contains information such as SKU, item weight, and shippability. - name: weight | type: number | description: Line item weight. Measurement unit matches the weight unit specified in `weightUnit` in the request. - name: sku | type: string | description: Stock-keeping unit. Learn more about [SKUs](https://www.wix.com/encyclopedia/definition/stock-keeping-unit-sku). - name: shippable | type: boolean | description: Whether this line item is shippable. - name: appliedDiscounts | type: array | description: Applied discounts. - ONE-OF: - name: coupon | type: Coupon | description: Coupon details. - name: _id | type: string | description: Coupon GUID. - name: code | type: string | description: Coupon code. - name: amount | type: MultiCurrencyPrice | description: Coupon value. - name: name | type: string | description: Coupon name. - name: merchantDiscount | type: MerchantDiscount | description: Merchant discount. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: percentage | type: number | description: Discount Percentage. Will be calculated from items price before other discounts. - name: discountRule | type: DiscountRule | description: Discount rule - name: _id | type: string | description: Discount rule GUID - name: name | type: DiscountRuleName | description: Discount rule name - name: original | type: string | description: Original discount rule name (in site's default language). - name: translated | type: string | description: Translated discount rule name according to buyer language. Defaults to `original` when not provided. - name: amount | type: MultiCurrencyPrice | description: Discount value. - name: discountType | type: DiscountType | description: Discount type. - enum: GLOBAL, SPECIFIC_ITEMS, SHIPPING - name: lineItemIds | type: array | description: IDs of line items the discount applies to. - name: metadata | type: EventMetadata | description: none - name: instanceId | type: string | description: App instance GUID. - name: eventType | type: string | description: Event type. - name: identity | type: IdentificationData | description: The identification type and identity data. - ONE-OF: - name: anonymousVisitorId | type: string | description: GUID of a site visitor that has not logged in to the site. - name: memberId | type: string | description: GUID of a site visitor that has logged in to the site. - name: wixUserId | type: string | description: GUID of a Wix user (site owner, contributor, etc.). - name: appId | type: string | description: GUID of an app. - name: identityType | type: WebhookIdentityType | description: - enum: UNKNOWN, ANONYMOUS_VISITOR, MEMBER, WIX_USER, APP - name: accountInfo | type: AccountInfo | description: Details related to the account - name: accountId | type: string | description: GUID of the Wix account associated with the event. - name: parentAccountId | type: string | description: GUID of the parent Wix account. Only included when accountId belongs to a child account. - name: siteId | type: string | description: GUID of the Wix site associated with the event. Only included when the event is tied to a specific site. - name: _id | type: string | description: Event GUID. With this GUID you can easily spot duplicated events and ignore them. - name: entityFqdn | type: string | description: Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. - name: slug | type: string | description: Event action name, placed at the top level to make it easier for users to dispatch messages. For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. - name: entityId | type: string | description: GUID of the entity associated with the event. - name: eventTime | type: Date | description: Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. - name: triggeredByAnonymizeRequest | type: boolean | description: Whether the event was triggered as a result of a privacy regulation application (for example, GDPR). - name: originatedFrom | type: string | description: If present, indicates the action that triggered the event. - name: entityEventSequence | type: string | description: A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. ``` ### Examples ```javascript import { abandonedCheckouts } from '@wix/ecom'; abandonedCheckouts.onAbandonedCheckoutUpdated((event) => { // handle your event here }); ``` ```javascript import { createClient, AppStrategy } from '@wix/sdk'; import { abandonedCheckouts } from '@wix/ecom'; const wixClient = createClient({ auth: AppStrategy({ appId: 'MY-APP-ID', publicKey: 'YOUR_APP_PUBLIC_KEY', }), modules: { abandonedCheckouts, }, }); wixClient.abandonedCheckouts.onAbandonedCheckoutUpdated((event) => { // handle your event here }); ``` ---