Skip to main content

Hi Folks,

 

I am using https://github.com/klaviyo/klaviyo-api-ruby to integrate with our app and create events.

I am using version 6.0.0 of the gem.

The response i get is 202 as shown below when i call the createEvent API with the payload shown below

The payload being sent as part of create event api is as follows:


  {"data"=>
    {"type"=>"event",
     "attributes"=>
      {"time"=>"2024-03-10T18:58:28.525Z",
       "metric"=>{"data"=>{"type"=>"metric", "attributes"=>{"name"=>"record.create"}}},
       "profile"=>
        {"data"=>
          {"type"=>"profile",
           "attributes"=>
            {"email"=>"john@gmail.com",
             "first_name"=>"John Doe",
             "last_name"=>nil,
             "id"=>"7c424f7b-e07f-41b6-922e-06169081e9fe",
             "properties"=>{"$profile.id"=>"7c424f7b-e07f-41b6-922e-06169081e9fe", "$profile.account.id"=>"79f7fc83-f706-47cd-9181-e4bf4a54e7cd"}}}},
       "properties"=>
        {"event.action"=>"create",
         "record.id"=>"8e0f3513-d6ea-4ba5-b31d-60ddfe125a90",
         "record.account.id"=>"79f7fc83-f706-47cd-9181-e4bf4a54e7cd",
         "record.subject.first_name"=>”John Does",
         "record.subject.last_name"=>nil,
         "record.subject.date_of_birth"=>nil,
         "record.subject.date_of_kindergarten"=>nil}}}}
 

 

However, It ends up creating an empty event with no metric as shown below:

 

Could please let me know what could be wrong with the data?

Hi @sharat94!

I’ll check on this internally and update the thread ASAP!

Best,
Brian


Hey @Brian Turcotte . Hope all is well at your end. Just checking in to see if you were able to take a look at this perhaps?

 

Regards,

Sharat


Hi @sharat94!

My apologies for the delay here!

Is this still occurring for you?

- Brian


I have the same problem (create event returns a 202, doesn’t create the event metrics, but does update parts of the profile). No solution after 2 months?


Hey  @sharat94, it’s possible you’re running into a similar issue to the one discussed in 

The profile ID is optional. If you don’t know the profile ID and only have the email, you should just provide the email alone as a profile identifier when creating these events. 



@KeithB, can you provide a little more context on what you’ve tried here so our team / the community can better assist you?
We had another similar thread recently, where the issue turned out to be due to using certain fake email address domains: 

 

If it’s neither of the above issues, sharing more details on your request payload, revision, and your 6-character public API key will allow us to dig in here.