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
- Go to Settings > Shopify
- Enter your Shopify store domain (e.g.
your-store.myshopify.com) - Click Connect to Shopify — you’ll be redirected to Shopify to authorize the connection
- 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
Setting Up
- Shopify Discount Template — select which Shopify discount to use as the base. Only code-based discounts appear (not automatic discounts). Create one in Shopify first if none exist.
- Advocate Custom Field — select which advocate custom field stores the minted code. We recommend creating a dedicated “Coupon Code” field with Require unique values enabled.
- Code Pattern — define how codes are generated using merge variables. Type
{to see available variables.
Available 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. Only letters, numbers, hyphens, and underscores are kept.
Example patterns:
BUNCH-{{advocate_identifier}}→BUNCH-PHIL{{advocate_first_name}}-VIP→PHIL-VIPSAVE-{{random_hex_6}}→SAVE-B7C2E4
Minting Codes
- Bulk Mint — click Mint Codes for All Advocates to create codes for all active advocates who don’t have one yet. Jobs are staggered to avoid overloading the Shopify API.
- Auto-Mint — when the toggle is enabled, codes are created automatically when 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 linking to your Shopify store with UTM tracking parameters
- 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.
Order Attribution
When Order Attribution is enabled, Stoked automatically matches Shopify orders to advocates using two methods:
- Discount Code (primary) — if a customer uses an advocate’s discount code at checkout, the order is attributed to that advocate
- 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:
- Conversation Tag — applied to the advocate’s most recent conversation
- 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 Tags —
stokedandstoked: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
- On the Shopify settings page, find the Attribution Rewards card
- Toggle Reward on attribution on
- Select the Activity Definition to use for rewards from the dropdown
- Click Save
How It Works
When an order is attributed to an advocate and rewards are enabled:
- Stoked creates an activity request using the selected activity definition
- If the activity definition requires approval, the request appears in your inbox for review — approve it to credit the advocate’s wallet
- 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:
- Scroll to the Recent Attributed Orders section at the bottom of the Shopify settings page
- Click Manually Attribute Order
- Enter the Shopify Order ID (found in your Shopify Admin)
- Select the Advocate to attribute the order to
- 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:
- Scroll to the Recent Attributed Orders section
- 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.