Skip to main content
Answered

[Webhooks] User in 'user.tag.created' only have old tags after adding a bunch of new ones

  • November 18, 2020
  • 2 replies
  • 15 views

Forum|alt.badge.img+1
  • Active User
  • 19 replies

Hello, it's me again with the new question about API and webhooks explicitly.

 

I've noticed strange behavior with 'user.tag.created':

When you add only one tag at a time - you get user with this tag in tags field.

 

But when I add a bunch of them user doesn't seem to include new ones in 'tags' field.

 

Below in my payload you can see that created tag (id: 4783953) is not present in user's tags.

I want to know is it expected behavior or no? Thanks in advance

 

Here you can see body of my notification:

 

"body": {

"type": "notification_event",

"app_id": "ep13p0k7",

"data": {

"type": "notification_event_data",

"item": {

"type": "user_tag",

"user": {

"type": "user",

"id": "5f8ffb5d6ed4af944328b4dc",

"anonymous": false,

"email": "lars@mail.com",

"name": "Lars Quincy",

"avatar": {

"type": "avatar"

},

"app_id": "ep13p0k7",

"companies": {

"type": "company.list",

"companies": [

{

"type": "company",

"company_id": "5fb376094e7bfe86cb25ef27-qualification-company",

"id": "5fb376094e7bfe86cb25ef26",

"name": "New New"

}

]

},

"location_data": {},

"created_at": "2020-10-21T09:11:57.544+00:00",

"updated_at": "2020-11-18T08:24:16.196+00:00",

"session_count": 0,

"social_profiles": {

"type": "social_profile.list",

"social_profiles": []

},

"unsubscribed_from_emails": false,

"marked_email_as_spam": false,

"has_hard_bounced": true,

"tags": {

"type": "tag.list",

"tags": [

{

"type": "tag",

"id": "4691116"

}

]

},

"segments": {

"type": "segment.list",

"segments": []

},

"custom_attributes": {}

},

"tag": {

"type": "tag",

"id": "4783953",

"name": "one more"

},

"created_at": 1605687902,

"admin": {

"type": "admin"

}

}

}

 

Best answer by Lisa B11

Hey @misha​  👋

 

I double checked this for you and that is expected behaviour, otherwise we'd need to slow down the the entire webhook delivery until all the new tags are accounted for. If you are using this to determine the most up to date list of tags - I'd recommend either querying the UI, or relying on both the .created and .deleted webhooks to keep track.

 

Hope this helps 😊

View original
Did this topic help you find an answer to your question?

2 replies

Forum|alt.badge.img+5
  • Employee
  • 250 replies
  • Answer
  • November 24, 2020

Hey @misha​  👋

 

I double checked this for you and that is expected behaviour, otherwise we'd need to slow down the the entire webhook delivery until all the new tags are accounted for. If you are using this to determine the most up to date list of tags - I'd recommend either querying the UI, or relying on both the .created and .deleted webhooks to keep track.

 

Hope this helps 😊


Forum|alt.badge.img+1
  • Author
  • Active User
  • 19 replies
  • November 24, 2020

Thanks. For now I send extra request to get all tags to be safe and because of our system's limitations


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings