Shopify Integration

Connect your Shopify store to automatically create discount codes for advocates, attribute orders to the right advocate, reward advocates for sales, and track revenue across your community.


Connecting Your Store

  1. Go to Settings > Shopify
  2. Enter your Shopify store domain (e.g. your-store.myshopify.com)
  3. Click Connect to Shopify — you’ll be redirected to Shopify to authorize the connection
  4. After authorizing, you’ll be redirected back to the Shopify settings page

Once connected, you’ll see your store name, domain, and connection status. Use the Quick Links to jump directly to your Shopify Admin or storefront.

Stoked automatically registers webhooks with Shopify during connection and runs a daily health check to verify the connection, OAuth scopes, and webhooks. If anything goes wrong, the connection is locked and an inbox notification is sent to all admins. When the issue is resolved, the connection is automatically unlocked and the alert is archived.

The Shopify integration is included on Enterprise plans. Basic and Pro communities can request access — contact the Stoked team to enable it.


Feature Toggles

After connecting, all features start turned off. Enable only the ones you need:

Feature What it does
Auto-Mint Codes on Activation Automatically creates a unique Shopify discount code when an advocate is activated
Order Attribution Attributes Shopify orders to advocates via discount codes or UTM share links
Order Notes Adds a Stoked attribution note to the Shopify order when an order is attributed
Order Tags Adds stoked and advocate identifier tags to attributed Shopify orders

Toggle features on or off from the Features card on the Shopify settings page, then click Save Features.


Discount Codes

The Shopify discount defines the offer — the discount amount, any conditions, and usage limits. Stoked uses it as a template and mints a unique discount code for each advocate under it, so every advocate shares the same deal with their own trackable code.

Setup is two steps: create a code-based discount in Shopify, then point Stoked at it.

Step 1: Create a code-based discount in Shopify

Stoked can only use code-based discounts as templates — not automatic discounts. If you don’t have one yet (or you see “No code-based discounts found” in Stoked), create one first:

  1. In your Shopify admin, go to Discounts > Create discount (or click Create a discount in Shopify from the Discount Codes card in Stoked)
  2. Choose a discount type — Amount off products, Amount off order, Buy X get Y, or Free shipping
  3. Under Method, select Discount codenot Automatic. This is required; automatic discounts won’t appear in Stoked
  4. Set the discount value (e.g. 15% off) and any conditions you want — minimum purchase, eligible products, usage limits, and active dates
  5. Click Save

The code text you type on this discount is just a starting point. Stoked generates each advocate’s actual code from the Code Pattern you set in Step 2, so you don’t need to craft the perfect code here — only the value and rules matter.

Set the discount up exactly how you want advocates’ offer to behave (value, conditions, limits). Every advocate’s minted code inherits these rules — you’re defining the deal once and letting Stoked personalize each code.

Step 2: Configure the template in Stoked

Back on the Discount Codes card on the Shopify settings page:

  1. Shopify Discount Template — search for and select the discount you created. Only code-based discounts appear. Start typing to search every discount in your store
  2. Advocate Custom Field — choose which advocate custom field stores each minted code. We recommend a dedicated “Coupon Code” field with Require unique values enabled. See Custom Advocate Fields to create one
  3. Code Pattern — define how each advocate’s code is generated using merge variables. Type { in the field to insert a variable

Click Save Configuration when you’re done.

Code Pattern Merge Variables

Variable Example Description
advocate_identifier PHIL The advocate’s unique identifier
advocate_first_name PHIL The advocate’s first name
random_hex_4 A3F1 4 random hex characters
random_hex_6 B7C2E4 6 random hex characters
random_integer_4 0742 4 random digits
random_integer_6 384021 6 random digits

All codes are automatically uppercased, and only letters, numbers, hyphens, and underscores are kept.

Example patterns:

  • BRAND-{{advocate_identifier}}BRAND-PHIL
  • {{advocate_first_name}}-VIPPHIL-VIP
  • SAVE-{{random_hex_6}}SAVE-B7C2E4

Keep the pattern readable (like BRAND-{{advocate_identifier}}) so advocates can easily share and remember their code, or add a random element (like {{random_hex_4}}) if you’d rather codes be harder to guess.

Minting Codes

Once the template and custom field are configured, generate codes for your advocates:

  • Bulk Mint — click Mint Codes for All Advocates to create codes for every active advocate who doesn’t have one yet. Jobs are staggered to avoid overloading the Shopify API
  • Auto-Mint on Activation — toggle this on to create a code automatically the moment an advocate is activated

The code stats show how many active advocates have codes and how many still need one. You can re-run bulk mint anytime — it only creates codes for advocates missing one.

If a code can’t be generated after 5 attempts (e.g. due to uniqueness collisions), that advocate is skipped and our team is notified. You can re-run bulk mint to try again.


Generating an Offer

Click Generate Offer to create an offer page pre-configured with your Shopify discount. The offer includes:

  • The discount code field (displayed as a copyable code)
  • A “Shop Now” button that links to your storefront and applies the advocate’s code automatically — it points at your customer-facing store domain (not the .myshopify.com address) using Shopify’s /discount/CODE link, with UTM tracking parameters
  • A default, personalized description with merge variables (e.g. your brand name)
  • The discount title as the offer name

After generating, you’ll be taken to the offer editor to customize the headline, description, and button text. The headline and description support merge variables — type { in either field to insert the advocate’s first name, your brand name, a custom field value, and more. See Creating an Offer for the full list.


Order Attribution

When Order Attribution is enabled, Stoked automatically matches Shopify orders to advocates using two methods:

  1. Discount Code (primary) — if a customer uses an advocate’s discount code at checkout, the order is attributed to that advocate
  2. UTM Share Link (fallback) — if no discount code is used but the customer arrived at your store through an advocate’s share link (via UTM parameters), the order is attributed based on the link

Attribution Tags

Optionally configure tags to automatically label conversations and prospects when an order is attributed:

  1. Conversation Tag — applied to the advocate’s most recent conversation
  2. Prospect Tag — applied to the purchasing prospect

Select tags from your existing tag library, or leave blank to skip tagging.


Order Notes and Tags

When enabled, Stoked pushes attribution information back to the Shopify order:

  • Order Notes — a note with the advocate’s name, attribution source, discount code used, and a link to the conversation in Stoked
  • Order Tagsstoked and stoked:advocate:{identifier} tags for filtering in Shopify

These appear on the order detail page in your Shopify Admin.


Attribution Rewards

Automatically reward advocates when their attributed orders come in. Stoked uses your existing Activity Definitions to create reward requests — no separate configuration needed.

Setting Up

  1. On the Shopify settings page, find the Attribution Rewards card
  2. Toggle Reward on attribution on
  3. Select the Activity Definition to use for rewards from the dropdown
  4. Click Save

How It Works

When an order is attributed to an advocate and rewards are enabled:

  1. Stoked creates an activity request using the selected activity definition
  2. If the activity definition requires approval, the request appears in your inbox for review — approve it to credit the advocate’s wallet
  3. If the activity definition has auto-approve enabled, the advocate’s wallet is credited immediately

The inbox card for a Shopify reward request shows the order amount, attribution source, discount code used, and refund status so you have full context when approving.

Create a dedicated activity definition for Shopify rewards (e.g., “Shopify Sale Reward = 50 points”) so you can track Shopify-driven rewards separately from other activity types. See Activity Definitions for setup.


Refund Tracking

When a customer refunds a Shopify order that was attributed to an advocate, Stoked automatically marks the attribution as refunded. You’ll see a Refunded badge on the order in the Recent Orders list and on the conversation detail page.

If Attribution Rewards are enabled and the original order had an approved reward, Stoked also creates a reversal request in your inbox. Approving the reversal debits the reward amount from the advocate’s wallet.

Reversal requests use the same activity definition as the original reward. When you approve a reversal, the wallet is debited instead of credited.


Manual Attribution

If an order wasn’t automatically attributed (for example, the customer didn’t use a discount code or share link), you can manually attribute it:

  1. Scroll to the Recent Attributed Orders section at the bottom of the Shopify settings page
  2. Click Manually Attribute Order
  3. Enter the Shopify Order ID (found in your Shopify Admin)
  4. Select the Advocate to attribute the order to
  5. Click Attribute Order

Manually attributed orders appear in the Recent Orders list with a Manual source badge.


CSV Export

Export all attributed orders as a CSV file for reporting or analysis:

  1. Scroll to the Recent Attributed Orders section
  2. Click Export CSV

The export includes customer email, discount code, attributed advocate, attribution source, order amount, order date, and refund status.


Per-Advocate Stats

Each advocate’s detail page shows a Shopify Attribution card in the sidebar with:

  • Orders attributed — total number of orders attributed to this advocate
  • Revenue attributed — total order value attributed to this advocate
  • Last order — date of the most recent attributed order

This gives you a quick snapshot of an advocate’s sales impact without leaving their profile.


Shopify Orders on Conversations

When a conversation’s advocate has Shopify orders attributed to them, the conversation detail page shows a Shopify Orders card in the sidebar listing all attributed orders for that conversation, including order amount, date, and refund status.


Recent Attributed Orders

The bottom of the Shopify settings page shows the 25 most recently attributed orders, including:

  • Customer email and discount code used
  • Attributed advocate name
  • Attribution source (Discount Code, Landing Site, Manual, or Unattributed)
  • Order amount and date

Disconnecting

To disconnect your Shopify store, click Disconnect Store at the bottom of the connection status card. This removes the connection and clears stored credentials. Existing discount codes in Shopify are not deleted.

Disconnecting stops all attribution, auto-minting, and webhook processing immediately. Offers that reference Shopify discount codes will still display but won’t create new codes.


© 2024-2026 Stoked — Real conversations. Real trust.