Solved

Is there any way to generate random Profile Property value in flows Property update step?


Badge +1

Hey! 

I’m kinda new to Klaviyo, but I have some experience in different Ecomm marketing systems.

I want to generate a random value (for example: random code for coupon), that I can send out in email during the flow steps. 

Is there any macro or something to do this, or do I have to use a 3rd party app like Make.com to get back the random value via API. It would be nice to not use any 3rd party app to do this, for a relatively easy task.

Thanks,
Greg.

icon

Best answer by saulblum 8 March 2023, 16:53

View original

4 replies

Userlevel 5
Badge +19

It sounds like you’re using a custom integration (as opposed to a ready-made one like Shopify), and if that’s the case, no, Klaviyo cannot handle that natively. So yes, you’d need to integrate with something else.

 

However, if I’m wrong, and you ARE using Klaviyo with Shopify (or others), then that function is already available “out of the box.”

Badge +1

Hey David!

Thanks for the fast update.

We are using WooCommerce+WordPress. I can’t find any reference to do this custom coupon to Woo.

Userlevel 5
Badge +19

Ah, yeah. Unfortunately, there is no easy way to do this and Klaviyo has yet to release an official or unofficial workaround. In my travels around various Klaviyo facebook groups, forums, and Zapier communities, I’ve seen some complex solutions that involve a random generator, Google Sheets, some API calls, and some other kind of action to get this to work, but I can’t remember off the top of my head, nor have I done it myself. Seems like it would be a fun one to figure out for an automation geek like me. ;-)

Userlevel 5
Badge +7

Do the random strings need to be also saved back to some system? Do you have to ensure they are unique?

Or do you just need the ability to generate a random string of a certain length and include it in an email, and maybe save it to a profile property?

If the latter, you might be able to do some fancy django tagging, see e.g. https://stackoverflow.com/questions/10860984/random-string-in-django-template/10938877

Reply