Help with Klaviyo update profile when order is placed in Shopify

I want to update profile in Klaviyo using custom properties (which is not a problem). Specifically, it is the total number of orders the customer has placed.

I have set up the whole thing and as a trial, I put all the information in Google Sheet (not Klaviyo) using ‘watch orders’ and ‘get customers’ from shopify, just to see if everything works ok and it does.
The main problem is when I add Klaviyo, i then ask me “Person ID” which is must and I don’t know the ID, Klaviyo hasn’t given this information to Make. In contrast, I have all the information from Shopify in Make. How to solve? Please help!

Hi Shaz. Welcome to the Community!

In an ideal world, you’d already have the Klaviyo Profile ID (aka Person ID) stored as a custom field in Shopify. But it looks like that’s not the case here …

First you’ll need to identify the Profile ID in Klaviyo that relates to the customer from Shopify.

To do that, you’ll need to use the Klaviyo List Profiles module with a Filter to find the right profile relating to your customer. You’ll probably just want to filter on the email (as you tried to do in your screenshot).

NB - the Fields Profile selections are the fields to output, not what you’re searching for. You’ll need to fill out the Filter parameter according to the details at the link it references.

The List Profile module will give you a Profile ID which you can use in the Person ID field for the Update a Person module.

3 Likes

thanks for that. Please have patience with me, this is my very first attempt using Make. I kind of followed your advice (or perhaps did not)





but it is not working. What am I doing wrong.

Best is to have them in images. Thank you.

Error is this

Hi Shaz.

The scenario only runs with what you’ve saved.

The * on the Update a Person module is indicating that you haven’t saved the values since changing them, so the saved version doesn’t yet have a Person ID value.

Click the OK button on that module and let us know what happens when you try again!

3 Likes

Thanks for letting me know that.

I saved the scenario, its exactly the same error.

Thanks,
Shaz

If you click on the “1” in the bubble above the List Profiles module, it will show the values that it found … could you post a screenshot of that?

3 Likes

Screenshot 2024-04-17 at 15.30.12

I played around with this and if I put the email address of the person, then it works ok. For example in the filter if I put:
equals(email,"abc@gmail.com")
where abc@gmail.com is the email address of the person from the previous shopify module called “Get Customer”. So if scenario is giving an error, simply put the email address and it works fine.

Then what I did was to put the email address in the “Set Variable” module and called the variable, “MyVariable”

Then I used equals(email,“MyVariable”), thinking that the MyVariable will do the trick, but no it does not get passed on. So the question is how to pass the value of the email.

Hi Shaz.

I think the main problem is in this image:

Rather than the text 1.Attributes: Email, you need to map the output from the Shopify module in the same way as you did in the Update a Person module originally.

At the moment, it’s just passing that as literal text rather than passing the value of the email.

Also, you want to avoid the scenario continuing if the List Profiles module doesn’t find any matches. To do this, right-click on the path between List Profiles and Update a Person and select Set up a filter. Then filter based on the Total number of bundles field from List Profiles being greater than zero.

3 Likes

Does not work. Not sure why it is such a big deal. All I want is to get the profile ID of the person who has placed order in Shopify.
Spent 2 days on this and still stuck. Might just give up unless someone has workable idea.

I think I have made it to work. I will test this further and submit the solution for others to follow.

3 Likes

So here is the solution to the following problem:

“How to update/add custom profile into Klaviyo using Shopify”

The first image is just the scenario. The logic is:

Step 1: “Watch orders” is simply watching: “Open”, “Paid” and “Unfulfilled” orders. I have set the limit to 1.
Step 2: In this step – “Get a customer”, I referenced customer id from the previous step, will look something like “15. Customer: Customer ID”. The difference could be in the number “15”.
Step 3” Set Variable: In this step, I set my own variable called MyVariable with a value of email from the previous step.
Step 4: List profiles. Here I list profile by passing “MyVariable” which has the email I am looking for from the previous step.
Step 5: Here I Pass the Profile ID from the previous step. And then add custom profiles by getting information from “Get a Customer”
Step 6: Just an addition to excel sheet

They add up to have 6 operations. However, if there is no order and I have set the limit to say 5 minutes, the scenario will just use one operation.

I am adding the images for people who are more into visual.

2 Likes



Screenshot 2024-04-23 at 10.11.13
Screenshot 2024-04-23 at 10.11.23


3 Likes

@DavidGurr_Make Thank you for your help. Could not have done it with your help. Can you please double check if their something else I must do.

I know you have mentioned above about the List profile and if it does not find anything? Is that necessary?

Thanks,
Shaz

All looks great! Well done.

You will need to handle the situation though where List Profiles can’t find a match for the Shopify customer email in Klaviyo.

If you just want to stop processing at that point, then place a filter on the path between the List Profiles and Update a Person modules, checking that the Total number of bundles field from List Profiles is greater than zero.

You might also want to send an alert in that case, by email, Slack or some other means. To do that, you could insert a Router module between those two modules and set filters on the output paths to handle it. Take a look at the free Make Academy training for details on how to do this (and so much more!).

2 Likes