Question

Empty event is created with 202 by klaviyo api gem

  • 10 March 2024
  • 3 replies
  • 36 views

Badge

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?


3 replies

Userlevel 7
Badge +36

Hi @sharat94!

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

Best,
Brian

Badge

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

Userlevel 7
Badge +36

Hi @sharat94!

My apologies for the delay here!

Is this still occurring for you?

- Brian

Reply