Documentation menu

Shopify

Connect a Shopify store to sync its customers into a MailInApp contacts list, trigger journeys off real store events, and see revenue tie back to a campaign or variant.

Connect your store

You connect a store by creating a small app for it in your own Shopify admin, then pasting that app's two keys into MailInApp. It takes about five minutes. You don't need a Shopify Partner account or any code, and the app stays private to your store.

You need to be the store's owner in Shopify (or a staff member allowed to develop apps), and the owner of your MailInApp account.

Step 1: Open the Dev Dashboard

In your Shopify admin, go to Settings → Apps and click Develop apps at the top right.

Shopify admin's Settings → Apps page, with the Develop apps button highlighted

On the App development page, click Build apps in Dev Dashboard. The first time, Shopify asks you to confirm your email and sign in again, then creates a developer organization named after your store. If the Dev Dashboard's Stores page says "No stores yet", that's fine: your store doesn't need to be listed there.

The App development page, with the Build apps in Dev Dashboard button highlighted

Step 2: Create the app

In the Dev Dashboard, open Apps and click Create app, then Create app manually. Everything is on one form:

  • App name: anything you'll recognise, for example MailInApp.
  • App URL: https://mailinapp.com/dashboard/settings/integrations. Shopify opens this page after you install the app, so you land on MailInApp's connect form with your store address already filled in.
  • Embed app in Shopify admin: untick it. Your app has no page inside Shopify.
  • Scopes: read_customers,read_orders,read_products,write_discounts. These let MailInApp read your customers, orders and products, and create the single-use discount codes described below. MailInApp never changes your products, orders or customers. To reach orders older than about 60 days, add read_all_orders too. Your own app doesn't need Shopify's approval for it.
  • Webhooks API version: leave the default.

The Create an app form, with the App URL, the unticked Embed app in Shopify admin box, the scopes and the Create app button highlighted

Click Create app. Shopify asks you to release the first version: click Release.

The Release version dialog, with the Release button highlighted

Step 3: Install the app on your store

On the app's Overview page, click Test app in the Installs card and pick your store.

The app's Overview page, with the Test app button highlighted

Shopify shows its install screen with the access the app needs. It also says the app hasn't been reviewed. That's expected, because the app is your own and never goes through the App Store. Click Install.

Shopify's Install app screen, with the Install button highlighted

Your store now lists the app under Settings → Apps.

Step 4: Paste the keys into MailInApp

Back on the app's Overview page in the Dev Dashboard, the Credentials card has the Client ID and the Client secret. The secret is hidden; its copy button copies it.

The Credentials card on the app's Overview page, with the Client ID and Client secret fields

In MailInApp, open Settings → Integrations. In the Shopify card, enter your store address (your-store.myshopify.com), paste the Client ID and the Client secret, and click Connect Shopify. MailInApp may ask you to sign in again first, since the keys give full access to your store's data.

The Shopify card in Settings → Integrations, with the store address filled in and the Connect Shopify button highlighted

MailInApp checks the keys with Shopify, encrypts the Client secret and never shows it again. Then it creates a contacts list for the store and, in the background, syncs your customers (up to 5,000 in this first pass; later ones arrive as they're created) and your product catalogue.

Leave the IP allowlist in your app's settings off. If it's on, Shopify refuses MailInApp's requests.

Connecting Shopify is free on every plan, including Free. Your MailInApp plan is billed by MailInApp as usual, from Settings → Plan. Your whole product catalog syncs on every plan, and each plan includes a monthly allowance of store discount codes.

If the connection fails

The Shopify card says what went wrong:

  • Shopify didn't accept that Client ID and Client secret: copy both again from the Credentials card. If you generated a new secret, use the new one.
  • The app isn't installed on this store: do step 3 again (Test app, then Install).
  • Your app is missing these access scopes: in the Dev Dashboard, open the app's Versions, create a new version with the scopes from step 2, release it, then connect again.
  • This app belongs to another Shopify organization: create the app from your store's own admin, as in step 1, rather than from another Partner or developer account.
  • That isn't a Shopify store address: use the myshopify.com address shown under your store's name in Settings, not your own domain.

What it does

  • Customer sync: Shopify customers land in a contacts list scoped to this integration, kept current afterward by Shopify's own webhooks (customers/create, plus checkouts/create and orders/paid for the triggers below) rather than a periodic re-poll.
  • Journey triggers: a connected store can fire a journey's cart abandoned trigger (a checkout started but not completed) and its purchase trigger (an order paid), so a welcome-series or abandoned-cart automation can run off real Shopify activity instead of only MailInApp's own product-block checkout. See Journeys.
  • Revenue attribution: an order's own campaign/variant, where identifiable, rolls into the same response and A/B-test revenue numbers a native checkout order already produces.
  • Purchase-history segments & discount offers: order line items sync alongside customers, so an audience filter can match "bought product X between date A and B" (see Purchase history), and a project can mint a single-use Shopify discount code per matched recipient, redeemed on your own store checkout (see Discount offer). New orders sync from the orders/paid webhook automatically. For orders placed before you connected, run Backfill order history once from Settings → Integrations; Shopify limits it to roughly the last 60 days. A Product block imported from your catalog can independently mint its own Per-product discount, scoped to just that item, with no audience filter needed: see Store-native discounts and Shopify product discount codes.
  • Product catalog for the studio: your store's own active listings sync into MailInApp too, refreshed automatically on the same cadence as customers (no separate button). The Product block's Import from store picker searches this synced catalog and fills in a block's name, description, image and price from a real product. It's a one-time copy, not a live link, so nothing about a sent email can drift from what you reviewed. It also syncs each product's own page (from its Shopify handle) and, when that's available, sets the block to Link to external store checkout pointed straight at it, so an imported product is ready to sell on your Shopify store with nothing left to configure. Switch it back to MailInApp checkout manually if you'd rather take payment through your connected Stripe account instead.

Store reviews

Shopify keeps no reviews of its own, so MailInApp reads them from Judge.me, the review app on your store:

  1. In Judge.me, open Settings → Integrations and click View API token. Copy the private token.
  2. In MailInApp, open Settings → Integrations. On your store's card, under Judge.me, paste the token and click Connect Judge.me.

MailInApp checks the token with Judge.me, then syncs your reviews, and again with every store sync. It keeps only the reviews published on your store (not hidden or awaiting approval in Judge.me), the newest 5,000 at most. A review you hide or delete in Judge.me is gone after the next sync. MailInApp never keeps a reviewer's email address, and shows a name as the first name and last initial. The card shows how many reviews are synced, and Sync reviews now syncs them at once.

The token is only used to read reviews. Disconnect Judge.me deletes the token and the synced reviews, and so does disconnecting the store. Star ratings on imported products don't need the token: they come from the rating Judge.me already saves on each product in Shopify. See Store reviews for stars, reviews in emails and publishing.

Connection health & updating keys

MailInApp trades your app's keys for a short-lived Shopify access token (it lasts about a day) and gets a new one on its own before it expires. Nothing needs doing under normal use.

If the keys stop working, MailInApp stops syncing, and the Shopify card in Settings → Integrations shows Needs attention and says why:

  • Your Shopify app's keys stopped working: the secret was revoked, or the app was deleted. Click Update keys and paste the app's current Client ID and Client secret.
  • Your Shopify app isn't installed on the store anymore: the app was uninstalled from your store. Install it again from its Overview page (Test app). The keys stay the same, so MailInApp reconnects on its own within 6 hours and sets up its webhooks again. To reconnect at once, click Update keys and paste them.

To change the Client secret (for example, as a regular security habit), do it in two steps so the store never disconnects:

  1. In the Dev Dashboard, open the app's Settings and click Generate new secret. Both secrets work until you revoke the old one.
  2. In MailInApp, click Update keys on the Shopify card and paste the new secret.
  3. Back in the Dev Dashboard, revoke the old secret.

Shopify keeps signing its webhooks with the old secret until you revoke it, and MailInApp accepts either one in the meantime, however long that takes. Update keys also moves a store to another of your apps: paste that app's Client ID and secret.

Disconnecting

Disconnect in Settings → Integrations stops the sync and any further webhook processing at once. MailInApp removes its webhooks from your app and deletes the stored keys. You can then uninstall the app from your store, or delete it in the Dev Dashboard.

Uninstalling the app without disconnecting first only pauses the store: the card says the app isn't installed, and a reinstall picks up where it left off. If the app stays uninstalled for 30 days, MailInApp deletes the stored keys and disconnects the store. To connect a disconnected store again, fill in the form on the Shopify card. It starts with the store's address, and the store keeps its contacts list.

Discount codes MailInApp already created on your store (they start with MIA-) stay in Shopify when you uninstall the app or disconnect, and keep working until they expire, so codes in emails already sent still work. Shopify's uninstall screen says the app's discounts will be deleted; that refers to discounts an app runs itself, which MailInApp doesn't create. To stop the codes early, delete them in Shopify admin under Discounts.

Customers already synced stay in their contacts list: disconnecting an integration never deletes contacts, since they may already be a send audience for other projects. Delete the list yourself if you no longer need it.

MailInApp holds your store's customers on your behalf. Your own app doesn't pass Shopify's customer data deletion requests on to MailInApp, so when a customer asks you to delete their data, erase them in MailInApp too, from their contact profile (see Exporting or erasing one Recipient's data). The same goes for an uninstall: Shopify's uninstall screen says the app's developer will be asked to delete customer data within 48 hours. For your own app, that developer is you, and Shopify doesn't send that request on to MailInApp, so delete the store's contacts list yourself if you want it gone.