Solved

Is a custom integration needed?


Badge +1

Hi all!

I am working with a client who wants to move to Klaviyo and runs a WooCommerce store.

Their store has quite a lot of custom work on top of the standard WooCommerce plugin, and after adding a Klaviyo integration I can see that it wont be fit for purpose out of the box.

The main issue I have is that the store relies heavily on user roles to segment customers, and that porting a profiles role into Klaviyo as a custom property is a must have to use flows at all for us - for example even something basic like a welcome email needs to be role aware.

 

Sticking with signup emails as an example, I don’t see it as feasible to sync this custom property via the API:

  • If a user signs up on the site, how much delay is there before the integration syncs them up?
  • If I query the API to get a profile ID at signup, will the profile exist on klaviyo yet?
  • can I add the custom property before the welcome email flow is triggered for this user?

It feels like the answer is probably not.

Is my only option to abandon the woocommerce plugin, and to write a custom integration using Klaviyo API from scratch?

 

icon

Best answer by stephen.trumble 23 May 2022, 22:18

View original

3 replies

Userlevel 2
Badge +5

If you do have to do some custom work with the API, it is very intuitive and easy to work with. Custom properties don’t have to be set up first, you can just include them in JSON with an /identfy call to the API and they’re auto-created. Should be fairly straightforward in a Wordpress plugin etc.

Badge +1

If you do have to do some custom work with the API, it is very intuitive and easy to work with. Custom properties don’t have to be set up first, you can just include them in JSON with an /identfy call to the API and they’re auto-created. Should be fairly straightforward in a Wordpress plugin etc.

This is what I have seen while looking at the docs. 

However its obviously still quite a large task as the whole integration has to basically be recoded from scratch.

Ideally this could be avoided and my custom properties added on top of the syncronisation done by the WooCommerce integration without creating race conditions in terms of data.

Userlevel 7
Badge +60

Hey @jakewhiteley 

Welcome to the Klaviyo Community! Thanks for reaching out for help with your integration and updating profile properties.

What you are looking to do is actually quite common and is 100% feasible with your current WooCommerce integration.  The biggest concern as you mentioned in your post is creating race conditions with your data. However, as long as your code is written so that your profiles sync first and then adds the custom profile property a few seconds afterwards, you typically wont run into an issue. If you try to update the profile properties in bulk in tandem with the Woocommerce sync, then you may run into a race condition where the profile properties are read before the profile is synced or created.

@dartacus is right, you can use the Identify API documentation to add your user roles as custom profile properties in your custom API. Keep in mind, how you execute this will be entirely up to how your current custom work is set up. If you aren’t super comfortable writing this code, you can reach out to one of our Klaviyo Partners  for help implementing this code into your site. 

Hope this helps, and thank you for being part of the Klaviyo Community!

Reply