# Integrating to Shopify

You can use Zapier to integrate directly into your Shopify site, so that you can add it as a Product in your site, and attach recurring subscription payments via plugins like Recharge.

This guide will show you how to set this up, assuming you have a Shopify account and the Recharge Shopify App.

## Provision users when customers buy your customers

First create a new Zap, and in the trigger section find the ReCharge Zapier Integration. From the trigger events, select the New Subscription event and then connect to your account.

<figure><img src="/files/m0yuCabyBL97M84nvyxE" alt=""><figcaption></figcaption></figure>

For the Action, select Smorg and select Provision a new user.

<figure><img src="/files/inoWsWixhsqm5INLh4Xs" alt=""><figcaption></figcaption></figure>

You can then configure this action by filling in the information in the configuration screen:

* You should already have the Space ID from your Studio account
* For the other fields apart from password, use the "/" key to map the appropriate fields from the Recharge trigger.&#x20;
* For the Correlated User ID, map the email address
* For the password field, set a default password that will be used for all your customers, and in the communication to your customer you can advise them to change it once they have logged in.
* IMPORTANT - for the subscription expiry date, pick a date way in future e.g. 1st Jan 2100 so that your customers are always subscribed until they cancel.

<figure><img src="/files/9uMSOpGkFMTcFr5RqZJy" alt=""><figcaption></figcaption></figure>

## Handle subscription cancellations

You'll also need to create a new Zap to handle member cancellations. In this case, choose the Recharge Zapier Trigger and choose New Cancelled Subscription

<figure><img src="/files/Rc2u7Yrqes37XfAVCHki" alt=""><figcaption></figcaption></figure>

The Smorg Zapier action you would the configure would be the "Change user subscription expiration"

<figure><img src="/files/bEAAV7bMZj2ftZTZDqWj" alt=""><figcaption></figcaption></figure>

You can then go ahead and configure this action by mapping (using "/"), the expiration date to the cancellation date as provided by the Recharge Zapier trigger in the previous step.

You can also create a further Zapier action to send an email to your customers relating to the cancellation. FInd out how to do this by following the steps in this guide [Using Zapier to send welcome emails](/integrations/using-zapier-to-send-welcome-emails.md)and follow from Step 10 onwards.

## Send an email to your new customers

Follow this guide [Using Zapier to send welcome emails](/integrations/using-zapier-to-send-welcome-emails.md)to automate the sending of emails to your customers.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.mealiq.io/integrations/integrating-to-shopify.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
