Skip to main content
Solved

API Event Data for flows

  • November 24, 2022
  • 1 reply
  • 136 views

Forum|alt.badge.img+3

Hi

I am having trouble setting up email flows using event data from our API we have just set up for our sales which are made in store.

This is the data which is coming across from our API, but I am having trouble setting up flows using the event data from this . Is the dynamic variable codes different when using an API like the below or should they still work the same as the integration with shopify. 

 

An example of what I am trying to do at the moment is set up a flow after purchase to review the products purchased. Wanted to have a photo of the products and the name and a review now button which will link back to the product where they can leave a review. Same or simular to the below. 

Thinking I probably cant have the photos as this doesnt come accross with the API but Im not sure and still cant seem to get the names of the products purchased coming across even.

This is what I have been using for the photo however it doesnt work

{{ product|lookup:'product_image_url' }}

For the title Im using

{{ product|lookup:'product_title' }}

And the review now linking to

{{ product|lookup:'review_rating_url' }}

 

Any help would be appreciated

 

Best answer by Brian Turcotte

Hi @Scott Williams and welcome to the Community!

 

You can certainly have flows that are triggered by custom events that are passed by the API - the practice is essentially the same whether it’s a custom event passed from your brick-and-mortar store or a native e-commerce event. Based on what I understand from your use case, there might be two issues going on here; dynamic block setup and event data passage.

 

May I ask how you are setting up the dynamic blocks in the flow (Screenshots might help)? Here are some Community posts and Help Center Articles that might help clarify this process:

https://help.klaviyo.com/hc/en-us/articles/4408802597659-How-to-Build-Dynamic-Blocks-in-a-Flow-Email-new-editor-
https://help.klaviyo.com/hc/en-us/articles/360032871031-How-to-build-dynamic-blocks-in-a-flow-email-classic-editor-

Additionally, it might be helpful to go over these Developer Docs to investigate how your integration is set up, or how it could be optimized:

Essentially, dynamic blocks use event variables to personalize content, and the syntax for different event variables depends on both the integration and event metric. Since you have a custom integration, it’s not possible for me to know your exact syntactical format. Here is a Help Center Article explaining this. In order to ensure that the correct data is passed and how you should format your event variables, you would have to check how your integration is set up. If you need more help with development, you’re always welcome to reach out to our wonderful network of developer partners!

I hope this helps to clarify, and thanks for using the Community!

 

- Brian

 

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

1 reply

Brian Turcotte
Forum|alt.badge.img+37
  • Klaviyo Alum
  • 1393 replies
  • Answer
  • November 25, 2022

Hi @Scott Williams and welcome to the Community!

 

You can certainly have flows that are triggered by custom events that are passed by the API - the practice is essentially the same whether it’s a custom event passed from your brick-and-mortar store or a native e-commerce event. Based on what I understand from your use case, there might be two issues going on here; dynamic block setup and event data passage.

 

May I ask how you are setting up the dynamic blocks in the flow (Screenshots might help)? Here are some Community posts and Help Center Articles that might help clarify this process:

https://help.klaviyo.com/hc/en-us/articles/4408802597659-How-to-Build-Dynamic-Blocks-in-a-Flow-Email-new-editor-
https://help.klaviyo.com/hc/en-us/articles/360032871031-How-to-build-dynamic-blocks-in-a-flow-email-classic-editor-

Additionally, it might be helpful to go over these Developer Docs to investigate how your integration is set up, or how it could be optimized:

Essentially, dynamic blocks use event variables to personalize content, and the syntax for different event variables depends on both the integration and event metric. Since you have a custom integration, it’s not possible for me to know your exact syntactical format. Here is a Help Center Article explaining this. In order to ensure that the correct data is passed and how you should format your event variables, you would have to check how your integration is set up. If you need more help with development, you’re always welcome to reach out to our wonderful network of developer partners!

I hope this helps to clarify, and thanks for using the Community!

 

- Brian