Pulling a specific customer Tag from Shopify
Good Morning, I currently have a flow that relies on pulling the Klaviyo ID from customer tags in Shopify. The problem I'm running into is that most customers have multiple tags which makes it difficult to extract the correct tag which starts with "Klaviyo ID:" for example "Klaviyo ID: 01G1TZJE4G2PYFW01AFCSD46N8". I would like to extract the tag that starts with "Klaviyo ID: " and only use the value after that.
0
Comments
Hi Shadner Joseph
You can add a transformation to extract the value of the Klaviyo ID. sample screenshot below.
Shadner Joseph to build on Sree Vani Amara's response, if you don't want the "Klaviyo ID: " piece of the string, since I assume you need just the id to map to Klaviyo, you can use the below handlebar expression. This will extract just the id, works if the tag is beginning, middle, or end of the tag string, and doesn't rely on hardcoded string lengths in case something changes down the road.
Tyler Lamparter and Sree Vani Amara
Thank you so much!
Please sign in to leave a comment.