This plug-in allows you to sync orders and abandoned checkouts collections into your MongoDB cluster. In this way you can perform queries, lookups and all other things easily with WeivData. There isn't any filtering etc. limit for these collections which you may see when you use WixData.

Right now you have 4 functions to sync these collections:

  • Orders (WixeComOrders)
  • AbandonedCheckouts (WixeComAbandonedCheckouts)

Orders collection is normally inside the Wix Stores database in Wix so the "orders" collection we are referring here is that collection.

The database name depends on your choice. You can configure it with config function.


We do not suggest writing to these collections, use these collections to only read data from it.


Functions are designed to work with wix-ecom-backend APIs Events. Define events inside the events.js file and point the functions you import from this plugin.

Example:

import { SyncWixApps } from '@exweiv/weiv-data';
const { wixEcom } = SyncWixApps;

export const wixEcom_onOrderCreated = (event) => wixEcom.onOrderCreated(event);
export const wixEcom_onOrderUpdated = (event) => wixEcom.onOrderUpdated(event);
export const wixEcom_onAbandonedCheckoutCreated = (event) => wixEcom.onAbandonedCheckoutCreated(event);
export const wixEcom_onAbandonedCheckoutRecovered = (event) => wixEcom.onAbandonedCheckoutRecovered(event);
interface wixEcom {
    onAbandonedCheckoutCreated(event: any): Promise<void>;
    onAbandonedCheckoutRecovered(event: any): Promise<void>;
    onOrderCreated(event: any): Promise<void>;
    onOrderUpdated(event: any): Promise<void>;
}

Methods

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>

  • Parameters

    • event: any

    Returns Promise<void>