1. Home
  2. Knowledge Base
  3. Extensions
  4. Digioh Shopify Coupon Code Extension Setup

Digioh Shopify Coupon Code Extension Setup

Overview

This extension dynamically generates a unique Shopify discount code for each user session and ensures it’s reused across multi-step forms by storing it in localStorage. It integrates with a Digioh Pipeline and uses metadata to configure API access and output mapping.

Step 1: Add a Shopify Connection

Before generating any coupons, connect your Shopify store to Digioh:

  1. Go to your Shopify store: Format: https://your-store-name.myshopify.com
  2. Log in and copy your Shopify Store Name (the subdomain).
  3. In Digioh, navigate to the New Integrations page.
  4. From the dropdown, select Shopify and click Add New Connection.
  5. Enter your Store Name and Admin Access Token.

👉 Need help with the access token? View Help Doc

Step 2: Create a Digioh Pipeline

  1. In Digioh, go to Pipelines and click Create New Blank Pipeline.
  2. Add a New Task and select Shopify.
  3. Configure the task:
    • Select your Shopify connection.
    • Enter your Price Rule ID.
    • (Optional) Add a Coupon Prefix.
    • Set the Coupon Code Length (default: 12).
    • Choose Alphanumeric or Numeric format.
  4. Click Save Task and Publish the Pipeline.

Step 3: Configure Required Metadata

To activate the extension, configure these metadata keys:

Widget or Account Metadata

 

Key Description Required
shopify_integration_id Your Digioh pipeline’s integration ID
shopify_discount_key Data layer field (e.g., custom_20) to store the coupon

Widget-Only Metadata

 

Key Description Required
shopify_coupon_generate Set to “true” to enable coupon generation on a Specific Pop-up

💡 All three keys must be configured correctly for the extension to function.

Extension Purpose

This extension dynamically generates a unique Shopify discount code via API and caches it in localStorage. It ensures only one code is generated per session, mapping the code to a data layer field for integration with platforms like Klaviyo, Iterable, or Braze.

Key Features

  • Metadata-Driven: Uses configurable metadata keys for setup.
  • Session-Based: Generates one coupon per session to prevent abuse.
  • Data Layer Mapping: Passes the coupon into a specified custom field.
  • Multi-Step Safe: Ensures consistent code across all steps of a form.

 

Updated on August 4, 2025
Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support