Skip to main content

Shopify integration

Connect your Shopify store to IncentIA so every order auto-creates a member (if missing) and earns points per your programme rules.

Case: ecommerce that wants to reward customers with points per purchase, with no custom development.

Time: ~15 min · Level: intermediate (requires Shopify admin access).

Prerequisites

  • A loyalty programme already created in IncentIA with at least one OnPurchase earning rule (see points tutorial).
  • Admin access to the Shopify store.
  • IncentIA public URL reachable from the internet.

1. Create the integration in IncentIA

  1. Admin → IntegrationsNew → type Shopify.
  2. Name: My Shopify store.
  3. On save, IncentIA generates:
    • Webhook URL: https://your-domain.app/api/webhooks/shopify/{integrationId}
    • HMAC Secret: random string Shopify uses to sign webhooks.
  4. Copy both.

2. Field mapping

In the Mapping tab of the integration:

Shopify fieldIncentIA fieldRequired
emailMember.Emailyes
total_pricepurchase amountyes
customer.first_nameMember.FirstNameno
customer.last_nameMember.LastNameno
customer.phoneMember.Phoneno
order_numberTransaction.ExternalIdno (for dedup)
line_itemsdetail (optional)no

Mapping determines what data reaches IncentIA and how it becomes Member and Transaction.

3. Configure member auto-creation

Options:

  • Auto-create if missing → the customer's first order auto-registers them in the programme (no OTP, no manual sign-up).
  • Match existing email only → if email exists in Members, the purchase is associated; otherwise ignored.

For smooth onboarding, Auto-create is usually best.

4. Configure the webhook in Shopify

In your Shopify admin:

  1. SettingsNotificationsWebhooks section.
  2. Create webhook:
    • Event: Order paid
    • Format: JSON
    • URL: the IncentIA URL from step 1.
  3. Save.

(Optional) Also add Customer updated if you want to sync profile changes.

5. Configure HMAC signing

Shopify signs every webhook. In IncentIA, the integration verifies the signature with the secret from step 1.

If the secret is different, webhooks arrive but are rejected with 401. Check logs at Admin → Integrations{your integration}Logs tab.

6. Test with a real (or sandbox) order

  1. Create a test order in Shopify (or use the development store).
  2. On payment, Shopify sends the webhook.
  3. In IncentIA → IntegrationsLogs: see the entry with 200 and the summary.
  4. Admin → Members: the customer appears (if new).
  5. Admin → Transactions: the transaction is logged.
  6. The member has points per your earning rules.

7. Member notification

If the customer is new, typically send:

  • Welcome email to the programme (template welcome_email + flow trigger).
  • Include link to their portal to see points: https://your-domain.app/member.

Existing members get only the "you earned X points" notification if your config allows.

8. Reprocess historical orders (optional)

To import historical data:

  1. Export Shopify paid orders from the last year.
  2. Admin → IntegrationsReprocess → upload the JSON.
  3. IncentIA ingests each order as if it just arrived (with is_backfill flag to skip emails).

Common issues

SymptomCauseFix
Webhooks arrive but 401HMAC secret copied wrongReset from Shopify, update in IncentIA
Duplicate membersSame email across storesEnable MatchByEmail and disable Auto-create
Duplicate pointsOrder received twice (Shopify retry)Enable ExternalId dedup in mapping
Member not createdEmpty email in ShopifyWebhook rejected (email is required)

What you built

  • Shopify sends webhook to IncentIA on every paid order.
  • IncentIA auto-creates members in the programme.
  • Points accumulate per existing earning rules.
  • Transaction history synced.

Next steps

  • Integrate WooCommerce or Stripe with the same pattern.
  • Configure a communications flow for post-purchase email → communications tutorial.
  • Launch a cashback campaign requiring Shopify evidence for an extra → cashback tutorial.