Skip to main content

Customer metafields created in shopify are not linked to Klaviyo.

I would appreciate it if someone could tell me what the rules are, e.g. only certain types are linked, etc.

Hey @Takaaki 

Depending on how the customer metafield is being updated there is a good solution to get this data in to Klaviyo using Klaviyo’s Track Event Function in Shopify flow.

Unfortunately there is not a customer updated trigger in flow at present but if you can populate the metafield with the flow property can be pushed over to klaviyo as a customer property or event.

Below is an example for on order creation, populating customer metafield and sending data to Klaviyo.


The process for this is as follows:
1. Setting Up Shopify Flow

  • Click Create Workflow and select the trigger: Shopify > Order is created.
  • Then add an action: Flow > Wait > 1 minute (to allow backend processing).
  • Next, add a Action: Update customer metafield 
  • Populate the metafield data as you like. eg custom.age: 30

2. Connecting Shopify Flow with Klaviyo

For each of the actions previously defined, you'll now integrate Klaviyo to track events:

  1. Click Then > Action > Klaviyo > Track Event.
  2. Inside this event:
  • Add your Klaviyo Public API Key.
  • Set the Event Name for Klaviyo.
  • For Customer Email, click Add Variable > Order > Email. This will insert the value {{order.email}}.
  • For Customer First Name, click Add Variable > Order > Customer > First Name ({{order.customer.firstName}}).
  • For Customer Last Name, click Add Variable > Order > Customer > Last Name ({{order.customer.lastName}}).

For Customer Properties (e.g., for "self" buyers), use:

{

  "customer-age": "{{variable}}."

}

For Event Properties, you would follow the same format
 

3. Setup Variable

Click between the quotation marks ("") and then click Add which ever variable information you wold need.

 4. Run a test order

Run a test order using the profile information you’ve set up. Once the order is completed, navigate to Klaviyo and search for the customer profile associated with the test. Check that the flow was triggered correctly and that the Customer Properties have been updated with the defined values, such as "customer-age: 30", if applicable.

Any issues or questions, let me know. 
Or if you are populating in another way.

Thanks

Tim


Hi ​@TimMartinHarvey! I came across this post and tested your solution using Shopify Flow - thank you for sharing! In my test, I can see the event but no activity data was populating and the custom profile properties did not pull through. I may have missed something?

 


@Madelena I followed the instructions as well and ran into the same issue of the event data not populating in the Klaviyo profile. Did you ever resolve this issue?


Hi ​@Madelena & ​@kellyMC 

Looking at the screenshot you have sent, you have not entered the properties data correctly.
Klaviyo needs it in the correct format to read it other wise it is ignored.
If you follow step 2 & 3, you data should be structured something like:

{
  "impact-status": "{{order.customer.pva_pollution.value})"
}

Here you are stating the field and the value in the correct format.
Where as in the example you have sent you are pushing raw data with no where for it to live on the profile.

Secondly this will likely not show any data in “Activity details” but the property will be updated directly in the customer properties section of the profile page. 

Lastly i would also add an event in the same structure just so you can see the event data in the timeline but not against the customer. EG:

{
  "impact-status-update": "{{order.customer.pva_pollution.value})"
}

Let me know if this resolves your issue.


Reply