Shopify Integration
The Gamopanda Shopify app adds three Shopify Flow actions and a theme block to your store. Flow actions let you trigger streak and challenge progress from any Shopify automation — order paid, checkout completed, loyalty event — without writing backend code. The theme block embeds the Gamopanda loyalty widget directly into your storefront, surfacing progress and rewards to logged-in customers in real time.
Installation
Install the Gamopanda app from the Shopify App Store. Once installed, the Flow actions are immediately available in Shopify Flow and the theme block is available in your theme editor.
After installation, the app will store your account_id in a shop metafield (gamopanda.account_id) and organization_id in a shop metafield (gamopanda.organization_id). This is used automatically by the storefront widget — you do not need to configure it manually.
Floating widget
The Gamopanda Storefront Script is a theme block that embeds the loyalty widget into your storefront. It handles customer authentication automatically and renders the floating widget on every page where it is active.
Adding the block to your theme
- In your Shopify admin, go to Online Store → Themes → Edit Theme.
- In the theme editor, open App embeds.
- Find Storefront Script in the Gamopanda app blocks.
- Configure the widget (see Settings below).
- Enable the Storefront Script
- Save your theme.
Storefront Script block configuration

Widget settings
Configure the widget appearance and behaviour by entering the IDs from your Gamopanda dashboard:
| Setting | Description |
|---|---|
| Template Id | Controls the widget's copy and localisation. Find this in Gamopanda → Templates. See Template for field details. |
| Theme Id | Controls the widget's colours and typography. Find this in Gamopanda → Themes. See Theme for field details. |
| Floating Widget Id | Controls the launcher button style and position. Find this in Gamopanda → Floating Widgets. See Floating Widget for field details. |
All three fields are compulsory.
How authentication works
The storefront block detects whether a customer is logged in and handles authentication accordingly:
Logged-in customers
The block calls the Gamopanda API server-side and fetches the user accessToken. The widget is initialised with the accessToken, giving the customer full access to their progress, milestones, and rewards.
Guest visitors
If no customer is logged in, the widget is initialised without an accessToken. The widget renders in guest mode — public content (e.g. how the programme works, available streaks and challenges) is visible, but personal progress is not shown until the customer logs in.
The locale of the storefront (request.locale.iso_code) is passed automatically — no extra configuration needed for multilingual stores.
Rendered widget
Floating widget on storefront

End User Display on storefront (logged-in customer)

End User Display on storefront (guest visitor)

Flow actions
Not on Shopify Plus? The Flow actions below are custom app extensions that require Shopify Plus on some plans. If you're on a standard Shopify plan, you can achieve the same result using Flow's built-in HTTP Request action. Jump to the HTTP Request guide.
Execute Streak
Logs a customer activity event that contributes to a streak. Use this action in any Flow that tracks repeating behaviour — daily purchases, weekly visits, monthly workouts.
Internally, this action calls POST /schema/streak_log/record on your customer's behalf. See Streak Logs for field details.
Action fields
| Field | Required | Description |
|---|---|---|
| Customer | ✅ | The Shopify customer performing the activity. Resolved to a Gamopanda member automatically. |
| Streak Id | ✅ | The ID of the Gamopanda streak to log against. Found in your Gamopanda dashboard. |
| Activity Id | ✅ | The type of activity — e.g. order_paid, visited_store. |
| Activity Value | ✅ | The numeric value of the activity. Use 1 for count streaks. For sum streaks, pass the relevant value (e.g. order total). |
| Activity At | ✅ | The datetime the activity occurred. Used to determine the aggregation period. |
| Unique Identifier | The idempotency key so that duplicate requests are rejected. |
Action output
The action returns the created StreakLog record along with streakProgress, achievedMilestone(if any), nextMilestone(if any), taskProgress for the current period and achievedMilestoneRewardLog. You can use these output fields in downstream Flow steps. See Streak Logs for field details.
If you are managing coupons on your own, use the achievedMilestoneRewardLog.id output to chain directly into the Update Milestone Reward Log with Coupon action — no extra lookup needed.
Execute Streak Flow Action

Execute Challenge
Logs a customer activity event that contributes to a challenge. Use this action to track cumulative progress toward a spend, visit, or activity target — for example, a monthly $500 spend challenge.
Internally, this action calls POST /schema/challenge_log/record on your customer's behalf. See Challenge Logs for field details.
Action fields
| Field | Required | Description |
|---|---|---|
| Customer | ✅ | The Shopify customer performing the activity. Resolved to a Gamopanda member automatically. |
| Challenge Id | ✅ | The ID of the Gamopanda challenge to log against. Found in your Gamopanda dashboard. |
| Activity Id | ✅ | The type of activity — e.g. order_paid, order_created. |
| Activity Value | ✅ | The numeric value of the activity. Use 1 for count challenges. For sum challenges, pass the spend amount, step count, or other measurable value. |
| Activity At | ✅ | The datetime the activity occurred. |
| Unique Identifier | The idempotency key so that duplicate requests are rejected. |
Action output
The action returns the created ChallengeLog record along with challengeProgress, achievedMilestone(if any), nextMilestone(if any) for the current period and achievedMilestoneRewardLog. You can use these output fields in downstream Flow steps. See Challenge Logs for field details.
If you are managing coupons on your own, connect the achievedMilestoneRewardLog.id output directly to the Update Milestone Reward Log with Coupon action to issue a coupon in the same Flow, with no additional API calls.
Execute Challenge Flow Action

Execute Mission
Logs a customer activity event that contributes to a mission. Use this action to track cumulative progress toward a mission target — for example, a monthly $500 spend mission.
Internally, this action calls POST /schema/mission_log/record on your customer's behalf. See Mission Logs for field details.
Action fields
| Field | Required | Description |
|---|---|---|
| Customer | ✅ | The Shopify customer performing the activity. Resolved to a Gamopanda member automatically. |
| Mission Id | ✅ | The ID of the Gamopanda mission to log against. Found in your Gamopanda dashboard. |
| Activity Id | ✅ | The type of activity — e.g. order_paid, order_created. |
| Activity Value | ✅ | The numeric value of the activity. Use 1 for count missions. For sum missions, pass the spend amount, step count, or other measurable value. |
| Activity At | ✅ | The datetime the activity occurred. |
| Unique Identifier | The idempotency key so that duplicate requests are rejected. |
Action output
The action returns the created MissionLog record along with missionProgress, achievedMilestone(if any), nextMilestone(if any) for the current period and achievedMilestoneRewardLog. You can use these output fields in downstream Flow steps. See Mission Logs for field details.
If you are managing coupons on your own, connect the achievedMilestoneRewardLog.id output directly to the Update Milestone Reward Log with Coupon action to issue a coupon in the same Flow, with no additional API calls.
Execute Mission Flow Action

Update Milestone Reward Log with Coupon
Gamopanda comes with rewards and coupons management.
If you have set handleCoupon to true on the parent Reward configuration, you don't need this action.
Stamps a coupon code and issuance timestamps onto a Reward Log. Use this action immediately after Execute Streak or Execute Challenge detects a milestone crossing — it fulfils the reward by writing the coupon code back to the Reward Log record.
Action fields
| Field | Required | Description |
|---|---|---|
| Customer | ✅ | The Shopify customer who earned the reward. |
| Reward Log Id | ✅ | The ID of the Reward Log to update. Use the achievedMilestoneRewardLog.id output from Execute Streak or Execute Challenge. |
| Coupon Code | ✅ | The discount code issued to the customer. Generate this via Shopify's built-in discount actions before this step. |
| Reward Issued At | ✅ | The datetime the reward was issued. |
| Reward Expiry At | ✅ | The datetime the reward expires. |
Typical Flow pattern
Code
Update Milestone Reward Log with Coupon Flow Action

Using HTTP Request in Flow (non-Shopify Plus)
The Gamopanda Flow actions above are custom app extensions — on some Shopify plans these require Shopify Plus. If your store is on a standard plan and cannot use custom app actions, you can replicate the same behaviour using Shopify Flow's built-in HTTP Request action to call the Gamopanda API directly.
The HTTP Request action is available on all Shopify plans that include Flow. You will need your Gamopanda x-api-key and x-api-secret to authenticate requests.
Logging a streak activity
Use the HTTP Request action to call POST /schema/streak_log/record. See Streak Logs for the full list of fields, required parameters, and response structure.
HTTP Request configuration:
| Setting | Value |
|---|---|
| URL | /api/v1.0/schema/streak_log/record |
| Method | POST |
| Headers | x-api-key: <your-api-key> · x-api-secret: <your-api-secret> · Content-Type: application/json |
Request body (map Flow variables to these fields):
Code
See Streak Logs for the full field reference and response details, including how to read achievedMilestoneRewardLog from the response to chain into a coupon update step.
If you are managing coupons on your own, check achievedMilestoneRewardLog.id in the HTTP response body. If it is not empty, a milestone was just crossed — use it as the Reward Log Id in a follow-up HTTP Request to update the reward log with a coupon.
Logging a challenge activity
Use the HTTP Request action to call POST /schema/challenge_log/record. See Challenge Logs for the full list of fields, required parameters, and response structure.
HTTP Request configuration:
| Setting | Value |
|---|---|
| URL | /api/v1.0/schema/challenge_log/record |
| Method | POST |
| Headers | x-api-key: <your-api-key> · x-api-secret: <your-api-secret> · Content-Type: application/json |
Request body (map Flow variables to these fields):
Code
See Challenge Logs for the full field reference and response details, including how to read achievedMilestoneRewardLog from the response to trigger a reward.
If you are managing coupons on your own, check achievedMilestoneRewardLog.id in the HTTP response body. If it is not empty, a milestone was just crossed — use it as the Reward Log Id in a follow-up HTTP Request to update the reward log with a coupon.
Logging a mission activity
Use the HTTP Request action to call POST /schema/mission_log/record. See Mission Logs for the full list of fields, required parameters, and response structure.
HTTP Request configuration:
| Setting | Value |
|---|---|
| URL | /api/v1.0/schema/mission_log/record |
| Method | POST |
| Headers | x-api-key: <your-api-key> · x-api-secret: <your-api-secret> · Content-Type: application/json |
Request body (map Flow variables to these fields):
Code
See Mission Logs for the full field reference and response details, including how to read achievedMilestoneRewardLog from the response to trigger a reward.
If you are managing coupons on your own, check achievedMilestoneRewardLog.id in the HTTP response body. If it is not empty, a milestone was just crossed — use it as the Reward Log Id in a follow-up HTTP Request to update the reward log with a coupon.
Updating a reward log with a coupon
If you have set handleCoupon to true on the parent Reward configuration, you don't need this action.
Once a milestone is crossed (detected from the achievedMilestoneRewardLog in the streak or challenge log response), use a second HTTP Request action to stamp the coupon. See Reward Log for field details.
HTTP Request configuration:
| Setting | Value |
|---|---|
| URL | /api/v1.0/schema/reward_log/record/{{ achievedMilestoneRewardLog.id }} |
| Method | PATCH |
| Headers | x-api-key: <your-api-key> · x-api-secret: <your-api-secret> · Content-Type: application/json |
Request body:
Code
See Reward Log for the full field reference
Typical HTTP Request chain
Code
| Resource | Description |
|---|---|
| Streak | Configure the streaks your Flow actions log against |
| Challenge | Configure the challenges your Flow actions log against |
| Milestone | Reward checkpoints that trigger the reward log |
| Reward Log | The reward record updated by Update Milestone Reward Log with Coupon |
| Template | Widget copy and localisation settings |
| Theme | Widget visual styling |
| Floating Widget | Launcher button configuration |