Skip to main content

 

Lead scoring in klaviyo?

4 different flows that adds certain amount of points to the lead score property value.
I need help answering these 6 questions.

But I won't seam to get it to work.
The Json body is all done but that's about it. (Source https://www.klaviyo.com/blog/solution-recipe-13-lead-scoring-in-klaviyo)

{
    "token": "npublic key]",
    "properties": {
      "$email": "{{ person.email }}",
      "Lead_Score": {{ person|lookup:'Lead_Score'|default:0|add:'2'}}
    }
}

  1. Destination url? how do I find it or what is it? Tried reading but don’t understand
  2. Header? what to write?
  3. The business public api or make a private api?
  4. Change the "token" in the json body?
  5. If i want to remove points from the value, what word do I replace the “add” with?

 

Unfortunately, that article is out of date. Which means your JSON body is too.

It asks you to call the Identify API which no longer exists. Instead, you have to use the Update Profile endpoint with the email address.


Okay thank you. 

Will edit my text :) 


The Json body is the least of my problem though. 

I have no idea what to put in the header or destination url? 


Hi @

Thank you for posting in the Community!

You could try the following: 

  1. Destination url? how do I find it or what is it? Tried reading but don’t understand
    - https://a.klaviyo.com/api/track
     
  2. Header? what to write?
  • Content-Type": "application/json"
  1. The business public api or make a private api?-
  • I would go with the public API. 
  1. 4. Change the "token" in the json body?
  • { "token": "YOUR_PUBLIC_API_KEY", "properties": { "$email": "{{ person.email }}", "Lead_Score": "{{ person|lookup:'Lead_Score'|default:0|add:'2' }}" } }
  1. If i want to remove points from the value, what word do I replace the “add” with?
  • You could try with this function: "Lead_Score": "{{ person|lookup:'Lead_Score'|default:0|subtract:'2' }}"

Hope that helps! :-) 

Christian Nørbjerg Enger
Partner & CPO
Web: Segmento.dk
LinkedIn: @christianfromsegmento
Voldbjergvej 22b, 8240 Risskov


Hi @

Thank you for posting in the Community!

You could try the following: 

  1. Destination url? how do I find it or what is it? Tried reading but don’t understand
    - https://a.klaviyo.com/api/track
     
  2. Header? what to write?
  • Content-Type": "application/json"
  1. The business public api or make a private api?-
  • I would go with the public API. 
  1. 4. Change the "token" in the json body?
  • { "token": "YOUR_PUBLIC_API_KEY", "properties": { "$email": "{{ person.email }}", "Lead_Score": "{{ person|lookup:'Lead_Score'|default:0|add:'2' }}" } }
  1. If i want to remove points from the value, what word do I replace the “add” with?
  • You could try with this function: "Lead_Score": "{{ person|lookup:'Lead_Score'|default:0|subtract:'2' }}"

Hope that helps! :-) 

Christian Nørbjerg Enger
Partner & CPO
Web: Segmento.dk
LinkedIn: @christianfromsegmento
Voldbjergvej 22b, 8240 Risskov

 

“This Klaviyo endpoint is retiring”
Tried with https://a.klaviyo.com/api/events/ instead.

Tried that header and Json body and got a 401 error message..


Reply