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.

Retrieve a list of all data extension schemas for the Wix eCommerce Checkout entity

If your functionality requires access to fields that have been added to an entity, you might want to retrieve all of the schemas at once. For example, displaying the returned fields in a widget.

  1. Collect the FQDN of the relevant Wix API service entity, as returned in every webhook (except for legacy webhooks). The Wix eCommerce Checkout entity FQDN is wix.ecom.v1.checkout.
  2. Choose the namespaces you would like to retrieve this data for. You can pass multiple namespaces in one call, or leave it blank to retrieve all available namespaces.
  3. Call List Data Extension Schemas with the FQDN and namespace data.
  4. Display the returned data in your extension as relevant.

Add a field to a user-defined data extension schema for the Wix eCommerce Order entity

Display a site-specific field, such as alcohol by volume (ABV) for whiskey orders, alongside fields from Wix eCommerce Orders, in a widget.

  1. Collect the FQDN of the relevant Wix API service entity, as returned in every webhook (except for legacy webhooks). The Wix eCommerce Order entity FQDN is wix.ecom.v1.order.
  2. Call List Data Extension Schemas with the wix.ecom.v1.order FQDN and _user_fields namespace to check if a user-defined schema exists.
  3. Create or update the _user_fields namespace, as relevant:
    1. If no _user_fields namespace schema exists, call Create Data Extension Schema with the wix.ecom.v1.order FQDN, the _user_fields namespace and the new JSON schema.
    2. If a _user_fields namespace schema already exists, call Update Data Extension Schema with the wix.ecom.v1.order FQDN, the _user_fields namespace and the updated JSON schema.
  4. Display the user-defined field in your widget.

Note: Once you have added at least one user-defined field, your app should call List Data Extension Schemas every time a user navigates to your widget, to collect and display the user fields.

Did this help?