Solved

Woocommerce Coupon Dynamic Integration similar to Shopify


Badge +3

Hello community members,

I need your advice. 

Is there a free method that allows connecting Woocommerce Coupons with Klaviyo?

I’d like to create a flow with coupon codes and send an unique coupon (with a deadline) to unique user.

I noticed an existing Shopify and Magento integration. When can we have Woo available?

icon

Best answer by David To 14 October 2022, 17:18

View original

10 replies

Userlevel 7
Badge +60

Hello @WriteWithTalkToWalle,

Welcome to the Klaviyo Community!

Although we don’t have the exact connection for WooCommerce coupons like we do with Shopify and Magento, you can certainly still send unique coupon codes. In order to do so, you’ll need to supply the unique coupon codes to both Klaviyo and WooCommerce via a .CSV upload. This would then allow the coupon codes to be recognized in WooCommerce when checking out and for Klaviyo to randomly distribute them to your recipients in emails. I think taking a look at both the How to set up coupons for WooCommerce and Use uploaded coupons in a message subsection of the Getting started with coupon codes in Klaviyo Help Center articles will give you a better understanding of how to set this up.

Additionally, I know that @TRIBE has recently released a new Klaviyo Toolkit plugin which helps alleviate this sort of limitation between WooCommerce and Klaviyo. You can find their setup instructions and guide on this plugin from their How to dynamically generate single-use coupon codes for Klaviyo with WooCommerce article.

I hope this helps!

David

Userlevel 4
Badge +12

Any update on this feature please?

Been waiting for quite a while now 👴👵

Badge +1

Be great to get this feature in ASAP. Updates?

Userlevel 7
Badge +60

Hey @iRob,

At this time we do not have any updates to share regarding the availability of dynamic coupons for WooCommerce. 

Be assured, our Product Team is well aware of this feature request!

David

Badge +1

Thanks David, always good to get an update! Appreciate it.

Badge

hi @David To any updates on this feature?? thanks

It’s 2024 and this is still not a feature?

Hey @iRob,

At this time we do not have any updates to share regarding the availability of dynamic coupons for WooCommerce. 

Be assured, our Product Team is well aware of this feature request!

David

How long do they need to be aware of it before they actually build it? This seems like a very fundamental piece for customers using flows with WooCommerce...

Hey people, I have a semi-solution. It’s not the best, but it’s a proof of concept - easily to be adjusted to work with personal remarketing.

After having browsed the community forums for a while (cmon klaviyo, just implement this natively already), i’ve successfully been able to make an integration with Zoho Flow (Just like Zapier) and Klaviyo Webhooks.

Steps are

  1. Klaviyo outputs a webhook within the original flow
  2. Webhook is received by Zoho Flow with the data of the email (you could here also insert the first name to solve the issue described below)
  3. Function 1: “cleanEmailPrefix_2” extracts the string prior to the @ in the email address field, and strips this of any numbers (so it seems more personal)
  4. Function 2: “AddDaysAndFormatDate” just adds x amount of days to the current date in the flow, which shall become the expiry date in the coupon
  5. This reformatted string is then passed into a block in Zoho Flow to create a coupon in WooCommerce.

This successfully allows me to automatically create coupons expiring x days after a person has entered a flow, with something resembling their personal name in the code. If you have a first name field you should be able to do it easy as you don’t have to pass the info back to Klaviyo after formatting.

My issue: I need to have the ‘cleaned’ names sent back to Klaviyo so I can input as a property and target within a flow. My integration doesn’t allow this natively, so I might have to start researching Klaviyo API to make it custom. Unless anyone has an idea?

 

Example:
Klaviyo text: jane2doe12@gmail.com 
Prefix (static): shop
Coupon name inserted in: shop-janedoe
Expiry date: x days after creation
 

 

 

Functions: (super messy because Zoho Flow isn’t very good, so this has a few workarounds)

Function 1: “cleanEmailPrefix_2”

string cleanEmailPrefix(string email)
{
// Find the position of '@'
atIndex = email.find("@");
prefix = "";
// Initialize prefix
if(atIndex != -1)
{
// Extract part before '@'
prefix = email.left(atIndex);
}
// Initialize cleanedPrefix with the prefix
cleanedPrefix = prefix;
// Conceptual loop for removing digits
// Replace with actual Deluge code that achieves similar functionality
digits = {"0","1","2","3","4","5","6","7","8","9"};
for each digit in digits
{
// Use string replacement to remove each digit from cleanedPrefix
// Adjust the following line to use Deluge's string replacement method
cleanedPrefix = cleanedPrefix.replaceAll(digit,"");
}
// Return the prefix without numbers
return cleanedPrefix;
}

Function 2: “AddDaysAndFormatDate”

string addDaysAndFormatDate(int daysToAdd)
{
currentDate = zoho.currentdate;
newDate = currentDate.addDay(daysToAdd);
// Add the specified number of days to the current date
// Format the new date as 'YYYY-MM-DD'
formattedDate = newDate.toString("yyyy-MM-dd");
return formattedDate;
// Return the formatted date string
}

 

–––––––

Admins - maybe refer to this comment in the other coupon forums that’s been closed.

I just created simple plugin for client, I will make it available soon on my store and ping you here. You just need Klaviyo API key and Woo key/secrets. 

Reply