Settings · 9 min read · For owners and admins
Shopify
Sync your Shopify customers into Lemu, receive order and storefront events, and let voice agents confirm or cancel orders
The Shopify integration connects your store to Lemu. It does four things:
- Customers are synced into a Lemu contact list called Shopify.
- Store events (checkouts, orders, refunds, deliveries) arrive as contact events that can start or stop a journey.
- Products are kept in a Lemu catalog your agents and journeys can look things up in.
- Order actions let a voice agent confirm, cancel or tag the order a call is about, using the Shopify order action tool.
Lemu only reads your customers. It changes an order only when an agent action you set up asks it to.
Connecting#
There are two ways to connect a store. Both give the same features. A store can be connected to one LemuAI workspace at a time, and a workspace connects one store.
Option 1: install the LemuAI app#
The quickest way, with nothing to copy: customers sync into a contact list called Shopify, orders and checkouts arrive as events, store visits, carts and checkouts are tracked by LemuAI's pixel with nothing to paste, and products sync into your catalog.
Install LemuAI in Shopify
Install the LemuAI app on your store from Shopify and approve the permissions. Shopify opens LemuAI's page inside your Shopify admin.
Connect to your workspace
On that page, click Connect to Lemu. A new tab opens LemuAI (sign in if asked, as an Owner or Admin). Press Connect store. The link is valid for 15 minutes; if it expires, click Connect to Lemu again.
If you see "This store is already connected to another Lemu workspace. Disconnect it there first, or from Lemu's page in your Shopify admin.", disconnect the other workspace first.
Option 2: connect with your own app#
Create a small app in your own Shopify account. It takes about five minutes, and the App setup guide in Lemu walks through it with values you can copy. You need this option for Shopify discount code pools.
Create the app in Shopify
Go to
dev.shopify.com, sign in with the Shopify account that owns your store, and choose Apps → Create app. Name it something you will recognise, for example "Lemu". The app and the store must belong to the same Shopify organization.Fill in the app settings
Use the App URL shown in Lemu's setup guide. Turn Embed app in Shopify admin off, leave Redirect URLs empty, and pick the latest stable Webhooks API version.
Set the access scopes
Scope What it's for read_customersSync your customers into Lemu contacts read_ordersReceive order and checkout events, and look up an order before a call read_productsKeep a Products catalog in Lemu write_ordersOnly needed if a voice agent or journey should confirm, cancel or tag orders. Leave it out if you only want to read Then release the version. Nothing takes effect until you do.
Install the app on your store
Choose Install app, pick your store and approve the permissions. Then open the app's Settings and copy the Client ID and Client secret. Treat the secret like a password.
Connect in Lemu
On Settings → Integrations, click Connect on the Shopify card. Enter your store address (
mystore.myshopify.com, not your custom domain) and paste the Client ID and Client secret. Keep Send cart and purchase events to Lemu ticked if you want abandoned-cart and order calls. Lemu checks the credentials with Shopify before saving.
Have an older custom app? In your Shopify admin go to Settings → Apps and sales channels → Develop apps, open the app and then API credentials. Copy the Admin API access token (it starts with shpat_) and the API secret key, then choose Older custom app with an Admin API access token? in the connect form.
If you add a permission later, release a new version of the app and approve the update on your store again, or Lemu will report a missing permission.
Customer sync#
New and changed customers are pulled in automatically about every 30 minutes, into a contact list called Shopify. Sync is one way: Lemu reads your customers and never changes them in your store.
- Customers without a phone number are skipped, because Lemu can't call them.
- A person who comes in from Shopify and from another source is kept as one contact. See Contacts.
- Click Sync now on the store's settings page to pull the latest customers right away. Lemu shows how many were created, updated and failed.
Field mapping#
The Field mapping section on the store's settings page sets which Shopify value is saved into which Lemu contact field. The Shopify values you can map are:
first_name, last_name, email, phone, company, city, province, country, orders_count, total_spent, tags, note and state.
If customer names, emails, phone numbers or addresses come back empty, open your app in Shopify's Dev Dashboard and request access to protected customer data for those fields, then sync again.
Store events#
Choose which Shopify events Lemu receives in the Store events section. Each one becomes a contact event you can use as a journey trigger, with a delay, a cancelling event and conditions. For example: call 5 minutes after a Purchase whose payment_method is cod when the order total is over 2000. Lemu verifies every event with your app's secret before accepting it.
Orders arrive as Meta's standard Purchase event and started checkouts as InitiateCheckout, with value, currency and order_id, so revenue and ROI work without extra setup. See Standard and conversion events.
Setup required: store events need the store connected with the LemuAI app (option 1) or its own Shopify app (option 2). They aren't available with an older custom app that uses an Admin API access token.
| Event in Lemu | Shown as | When it's sent | On by default |
|---|---|---|---|
InitiateCheckout | Checkout started (cart_added) | A shopper started checkout and a phone number is known. Sent once per checkout, so you can use it for abandoned-cart follow-ups | Yes |
Purchase | Order placed (order_placed) | A new order, paid or not. payment_method is cod for cash on delivery, otherwise prepaid | Yes |
cod_order_placed | (sent with Order placed) | The new order is cash on delivery. Sent next to Purchase for now, so journeys that start on it keep working | Yes |
shopify.order.cancelled | Order cancelled | An order was cancelled. Useful to stop a call that is still waiting | Yes |
shopify.order.paid | Order paid | Payment was captured for an order | No |
shopify.order.fulfilled | Order fulfilled | Every item in an order has shipped | No |
shopify.refund.created | Refund created | A refund was issued on an order | No |
shopify.fulfillment.created | Shipment created | A shipment was created, with its tracking details | No |
shopify.fulfillment.event | Delivery update | Out for delivery, delivered, delivery failed. Only if your courier app reports tracking events | No |
shopify.customer.created | Customer created | A new customer account was created | No |
The options keep their earlier names (cart_added, order_placed), shown next to each checkbox; only the event they send changed. Journeys and segments that use cart_added or order_placed still match InitiateCheckout and Purchase.
Every order event carries the same details, such as order_name, total_price, currency, payment_method, is_cod, financial_status, items and the shipping address, so journey conditions and the Shopify tools work the same on all of them. Purchase also carries Meta's value, contents and content_ids.
cod_order_placed doesn't count as a second order: only the Purchase counts toward revenue. For new journeys, trigger on Purchase with the condition payment_method is cod.
Cash-on-delivery payment methods#
An order paid with a method whose name contains one of the words you list here (comma separated) is a Purchase with payment_method set to cod and is_cod set for conditions. For now it is also sent as cod_order_placed. The default is cash on delivery, cod.
Using events in a journey#
Pick a Shopify event in a journey's Events trigger. Events also appear in the Event Log under the Shopify source.
Storefront events#
Storefront events are what shoppers do on your store before they order: page and product views, collection views, searches, add to cart, remove from cart, cart views, checkout started, payment details entered and purchases. They use Meta's standard names where one exists (PageView, ViewContent, AddToCart, InitiateCheckout, Purchase and so on). See the full list. Shoppers stay anonymous until they log in or enter an email or phone at checkout. Then their earlier visits are added to their contact, and their actions can trigger journeys, for example a browse- or cart-abandonment message.
Setup required: with the LemuAI app (option 1), storefront events are tracked with nothing to paste. With your own app, in your Shopify admin, open Settings → Customer events and click Add custom pixel. Name it Lemu, choose the customer privacy permission your privacy policy needs, replace the code box with the code shown in Lemu's Storefront events section, then click Save and Connect.
The section shows when the last storefront event was received. For tracking on a site that isn't on Shopify, or in your app, use Tracking Sources.
A purchase reported by both the storefront and the store's order webhook counts as one order, because both carry the same order_id.
Products catalog#
If your app has the read_products scope, Lemu creates a Products catalog and keeps it in sync with your store every 30 minutes. Agents can look products up during a call with the catalog lookup tool in the Tools library.
Order actions#
Add the Shopify order action tool from the Tools library to a voice agent to let it confirm, cancel, tag or look up the order the call is about.
- Confirm adds a tag to the order (
cod-confirmedby default). - Cancel cancels the order with the customer's reason and adds a tag (
cancelled-by-callby default). - Every change is also tagged and noted on the order in Shopify.
Setup required: order actions need the write_orders scope on your Shopify app.
Shopify refuses some actions, for example cancelling an order that has already shipped or been paid. The agent is told when that happens.
Health and activity#
The store's settings page also shows:
- Health: which app permissions are granted, which are missing, and the recent deliveries Shopify has sent, with their status. If nothing has arrived yet, place a test order or start a checkout on your store.
- Agent activity: every change your voice agents made to this store during calls, including ones Shopify refused.
- App setup guide: how the app was set up, and what to do when you need to add a permission or reconnect.
Troubleshooting#
| Message | What to do |
|---|---|
| Shopify rejected the client ID and secret | Check that the app is installed on this exact store, belongs to the same Shopify organization, and that you pasted the Client secret, not the Client ID, into the secret field |
| The app is missing a required scope | Add the scope to the app, release a new version, then approve the update on your store |
| Events show as off | The settings page shows the exact reason. Its Health section lists what Shopify has sent recently |
Was this page helpful?
Docs