Skip to main content
Solved

Regarding trigger flow based on profile property update


Hello,

is it possible to trigger flow based on profile property update via API without segment or list metrics?

Best answer by KeviSunshine

@yagniksolanki108 what do you mean there is not a trigger email step? You should be able to drag a “Send Email” step into your flow for this trigger, no?

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

20 replies

KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 17, 2024

Hi @yagniksolanki108,

It is not possible to trigger a flow based on just a profile property being updated. I think the best way to achieve this is by triggering an event on the profile when the profile property is updated (or by using a segment but it looks like you’re trying to avoid that).

You could, for example, trigger the event with the same profile properties and then setup a Metric Flow that listens for that event and checks whether certain properties have been updated.

 

Best,

Kevin.


  • 0 replies
  • May 17, 2024

Thank you @KeviSunshine ,

I have tried to create custom event as per mention below:

https://a.klaviyo.com/api/events/

{

  "data": {

    "type": "event",

    "attributes": {

      "properties": {

        "custom": 5

      },

      "time": "2024-05-17T04:41:00+00:00",

      "metric": {

        "data": {

          "type": "metric",

          "attributes": {

            "name": "Test"

          }

        }

      },

      "profile": {

        "data": {

          "type": "profile",

          "attributes": {

            "properties": {

              "custom": 5

            },

            "email": "xyz@test.com"

          }

        }

      }

    }

  }

}

This “Test” event seems into custom flow but when i am trying to update property that time flow does not trigger 

is there any mistake in this API?


  • 0 replies
  • May 17, 2024



This is example that i am trying


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 17, 2024

Is the event being triggered on the profile? Can you go to that profile and check the activity log and see if the Test event exists?

Also, you may need to check the event property for “Custom > 0” instead of the profile property in your filter; I am not sure if the profile property is updated in time. But that’s a more advanced thing to try.

First just make sure the event is being triggered and that the event and profile properties exist as expected.

 

Best,

Kevin.


  • 0 replies
  • May 17, 2024

Hello @KeviSunshine ,

Yes event seems into “Activity Logs”.

 


 

Now i need to again call event api or just update profile property value from klaivyo ?


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 17, 2024

Each time you trigger the event Test, the profile will run through the flow.

Try adding a conditional step or setting your test email to “manual” so that you can see the profiles that have entered the flow.

You could, for example, add a flow step for “update profile property” that sets the profile property “custom” to the value of “event.custom.”

Then, for example, trigger an email to the user “Your value changed to custom 5!”

Then trigger the event on the profile again, and you should see the profile has run through both of your flow steps.

Does that make sense?


  • 0 replies
  • May 20, 2024

Hi @KeviSunshine 

 

Thanks for the reply and useful information.

Sure i will check as per mention by you and if any issue then reply here


  • 0 replies
  • May 20, 2024

Hello @KeviSunshine 

I have added “Profile property update” step into flow after “Test” trigger step.

 

 And trying to set as per mentioned by you :
``You could, for example, add a flow step for “update profile property” that sets the profile property “custom” to the value of “event.custom.”``

But not able to set value “event.custom”

am i anything missing here?

 


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 20, 2024

Oh, maybe it is not possible to update a profile property based on an event property in this way…?

 

I guess you’d have to use the “Call Webhook” endpoint which is a little more complicated but could also work… let me know if you want more info on that.


  • 0 replies
  • May 20, 2024

Thanks for the reply,

Please provide information regarding webhook endpoint so, i will try


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 20, 2024

Hi @yagniksolanki108,

I forgot that I went through this same step and asked the same question a couple years ago. You can’t use a variable in the Update Profile Property step, but you can use one for Webhooks. This post explains the basics: 

 

For your situation, you would use “{{ event.custom }}” instead of “{{ person.variable }}”.


  • 0 replies
  • May 20, 2024

Thanks you very much @KeviSunshine 

Sure, i will try your solution and i hope this will work as my expectation


  • 0 replies
  • May 21, 2024

Hello @KeviSunshine 
 

I have added webhook step into flow but as per mention track profile api currently deprecated so please let me know which Destination URL add into webhook step.

Track & Identify API Deprecated


And please let me know alternate way to achieve this ?

Thanks in advance!


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 21, 2024

Hi @yagniksolanki108,

Okay, you’re right, that API is deprecated. Let’s take a step back. What’re you trying to achieve?

When you trigger an event, you can add event properties and update a profile’s profile properties at the same time.

I think what you want to do is trigger an event that with the event property `custom`, but also update the profile property with the same `custom` value.

What do you want to do next in your flow? Send them an email?


  • 0 replies
  • May 21, 2024

Yes, basically i want send klaviyo email based on value update from database so as per klaviyo we need to create flow and trigger event like update profile property value than send email to relevance profile regarding updated value.


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 21, 2024

Okay cool, is your event updating the profile property when it’s triggered? The code you shared above makes it seem like it is.

 

What’re you trying to achieve next?


  • 0 replies
  • May 21, 2024

No, currently not working based on trigger event manually from postman but if we use default metrics like place order, checkout, etc then it works well.


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • May 21, 2024

Which part isn’t working on the manually triggered API call from Postman? The profile properties being updated?


  • 0 replies
  • May 22, 2024

Profile property updated while call event api but in flow there is not trigger email step


KeviSunshine
Expert Problem Solver III
Forum|alt.badge.img+8
  • Expert Problem Solver III
  • 159 replies
  • Answer
  • May 22, 2024

@yagniksolanki108 what do you mean there is not a trigger email step? You should be able to drag a “Send Email” step into your flow for this trigger, no?