Maestra

Maestra

Maestra

Track wishlist events in Maestra.

Maestra is an omnichannel marketing hub designed for online retail and DTC brands. Using Wishlist King, you can monitor your customers' wishlist activities in Maestra and construct marketing flows related to wishlist activity.

Code Access

Add the below code in Code Access > Event Subscribers.

export function setup({ app }) {

  // Leave the default subscribers and add the code below

  app.events.subscribe("wk:wishlist:add:success", (event) => {
    const { product, variant } = event.data;

    mindbox?.("async", {
      operation: "AddToWishList",
      data: {
        customer: {
          email: app.customer?.email,
        },
        addProductToList: {
          productGroup: {
            ids: {
              shopifyUK: product.id,
            }
          },
          product: {
            ids: {
              shopifyUK: variant?.id,
             }
          }
        }
      }
    });
  });
  
  app.events.subscribe("wk:wishlist:remove:success", (event) => {
    const { product, variant } = event.data;

    mindbox?.("async", {
      operation: "RemoveFromWishList",
      data: {
        customer: {
          email: app.customer?.email,
        },
        removeProductFromList: {
          productGroup: {
            ids: {
              shopifyUK: product.id,
            }
          },
          product: {
            ids: {
              shopifyUK: variant?.id,
             }
          }
        }
      }
    });
  });
}
Event Subscribers

On this page