Solved

API - Back in stock open / clicked rate

  • 24 March 2021
  • 3 replies
  • 415 views

Badge +2

Hello people,

 

I’m trying to export all my data from Klaviyo inside AirTable in order to centralize every tool i use ! (which is time consuming for me)

 

But i’m blocked regarding Back In Stock flows.

 

Here is what i’m trying to achieve :

  • My shop is working with pre-order and i’m using Back-In-Stock (BIS)
  • In the API, i retrieved people that are subscribed to BIS for a specific product.
  • But now, i want to know for a specific product what are my open rate / click rate (mails are sent by the flow BIS)

As it’s a flow, i tried to retrieve the opened email metric timeline based on message_id of the flow but i can’t know for which specific product it’s related to.

Here is what i get from the timeline endpoint (metrics : Opened Email)

{
"event_properties": {
"Email Domain": "gmail.com",
"Client Name": "Gmail image proxy",
"$event_id": "my_event_id",
"$_cohort$message_send_cohort": "cohort_message",
"$attribution": {},
"Client Type": "Other",
"Client OS": "Linux",
"$message_interaction": "message_id",
"$message": "message_id",
"Campaign Name": "Back in Stock: Email #2",
"$flow": "flow_id",
"Client OS Family": "Linux",
"Subject": "Your product {% catalog event.VariantId integration='shopify' %}{{ catalog_item.title }} {% endcatalog %} {% catalog event.VariantId integration=\"shopify\" %}{{ catalog_item.variant.title }} {% endcatalog %} is available !"
},
"uuid": "uuid",
"event_name": "Opened Email",
"timestamp": 1616577321,
"object": "event",
"datetime": "2021-03-24 09:15:21+00:00",
"person": {
......
},
"statistic_id": "statistic_id",
"id": "event_id"
},

My workaround was :

  • Trying to read the subject of the email. But as it’s a flow, there is only variable like :
    Your product {% catalog event.VariantId integration='shopify' %}{{ catalog_item.title }} {% endcatalog %} {% catalog event.VariantId integration=\"shopify\" %}{{ catalog_item.variant.title }} {% endcatalog %} is available !
  • Filtering by date (with the endpoint export) : but as i’m launching several Product in a month, the open / click will not be accurate. For Received Email it will work, but not for open/click

Do you know how can i find a solution ?

Or is there a way to custom event_properties inside flow’s messages ?

 

Thanks in advance,

Thomas.

icon

Best answer by caroline 29 March 2021, 17:27

View original

3 replies

Userlevel 5
Badge +8

Hi @Thomas_Rodier,

If I understand the question correctly, you are looking for a way to pull the open/click rates for Back in Stock flow emails associated with a specific product. What makes this difficult is that the product ID is associated with the “Subscribed to Back in Stock” event, not with the flow email itself. As a result, to pull metric data that includes the product ID, you will need to either the Subscribed to Back in Stock event, or make the product ID part of the email so that you can access the ID when pulling the Opened Email metric.

The only way to include the product ID in the email (while keeping it accessible via the Metrics API) would be to set the flow email’s subject to include the product ID via {{ event.ProductID }}. You would then be able to pull the Opened Email metric and sort by the product ID outside of Klaviyo. You also might be able to use the /export endpoint with a “where” or “by” statement to filter or segment the events by product ID.

At this time we do not have a way to add custom event properties to a non-custom event (Opened Email).

Hope this helps.

Best,

Caroline

Badge +2

Hello @caroline

That’s exactly what i’m trying to achieve.

Regarding your answer, that was exactly my worry.

 

I tried to add in the email’s subject something related to my product :

"Subject": "Your product {% catalog event.VariantId integration='shopify' %}{{ catalog_item.title }} {% endcatalog %} {% catalog event.VariantId integration=\"shopify\" %}{{ catalog_item.variant.title }} {% endcatalog %} is available !"

            },


But in the API, it remains as {{ event.VariantId }}. So i can’t used it.


Am I missing something ?
I feel like right now I can't achieve what I'm trying to do

 

Thanks for your help and your time @caroline !

Thomas.

Userlevel 5
Badge +8

Hi @Thomas_Rodier,

I checked with my team and unfortunately the metric Opened Email displays the Django syntax, not the actual content, as you’ve noticed.

I would recommend instead using our Custom Reports feature to build out reports specific to certain products.

About Custom Reports in Klaviyo
How to Build a Product Performance Report

Custom Reports
Guide to Building a Custom Report Strategy

Best,

Caroline


 

Reply