> For the complete documentation index, see [llms.txt](https://docs.swish.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swish.app/integrations/maestra.md).

# 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.

```jsx
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,
             }
          }
        }
      }
    });
  });
}
```
