February 7, 2025

Klaviyo Discount Flow Update Stacking on Discount Code

Problem

Klaviyo Discount Automations with Shopify like Discount count for newsletter signup, returning customer etc creates unique discount codes on Shopify using Price Rules but it currently does not support auto-enable stacking so the discount codes combine with other Product and shipping discounts.

Solution

Leveraging Shopify Discount Creation Event and listening to that via Flow Plus and based on the Price Rule Name created by Klaviyo updating the discount using the Shopify Flow Native Admin API Actions to Combine with Product, Shipping or Order Discounts.

Setup

1. Install Shopify Flow and Flow Plus.

2. Visit Flow Plus and Subscribe to a Plan that best suits your needs and go ahead and create a new Channel.

3. Move ahead with Completion of Channel Setup by clicking on the "Complete Channel Setup" button.

4. Get the Channel URL by clicking on the Clipboard button and visit the Notification section under Setting of Shopify Admin and click on Webhooks.

5. Create a new Webhook Subscription for Event "Discount Creation" and pasting the Flow Plus Webhook Target URL from previous step.

6. Trigger a Test to Complete the Flow Plus Channel Setup.

7. Click "Sync" on the Channel Setup screen on Flow Plus, that should load the test webhook data onto the Setup screen.

8. For this Flow we will create 2 field mappings, one for the Graphql Discount Node ID and the second for the Discount title that we can use to check if the discount was from Klaviyo.

9. Save, confirm the Mapping Preview and Activate the Channel, optionally Source authentication can be enabled.

10. Last step is updating the Channel ID on the Shopify Flow attached below, along with the Discount Title that we need to detect and update the Discount Node using the Admin API action to Combine with Shipping , Order or Product Discount.

11. The Channel ID can be found on the Channel Page on Flow Plus under the Title.

12. Update the Channel ID on the Imported Flow Template.

13. On the conditional Step the conditions can be built into Shopify Flow for which cases should the Flow run, in the example Flow we are checking if the Discount Title / Pricing Rule Name created by Klaviyo starts with "Welcome" or "Abandoned Cart" or "Reengagement".

14. On the last step, depending on requirements we can decide with Combination Rules need to be toggled on or off.

15. From now on every new pricing rule created by Klaviyo will fire a webhook to Flow Plus that will initiate the execution of the Workflow we created and updated the discount rules.

Does this flow apply to your business? Reach out if you need help setting it up!

Read More Articles

No items found.

Try Flow Plus for free today.

Welcome to a new era of seamless task management! Join Hubit for free today and embark on a journey towards enhanced productivity.

Start 7 Days Free Trial