Answered

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

  • 18 November 2020
  • 2 replies
  • 13 views

Badge +1

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"

}

}

}

 

icon

Best answer by Lisa B11 24 November 2020, 16:35

View original

2 replies

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 😊

Badge +1

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

Reply