Events: Label Applied to Stream Item
Learn about how to create a stream-item-label-applied event using notifications API.
The stream-item-label-applied event is triggered each time a label is applied to a stream item in the inbox.
Payload
| Field | Type |
|---|---|
| labels | array[string] |
| items | array[object] |
Items Object
| Field | Type |
|---|---|
| sfEntityType | string |
| entityId | string |
| text | string |
| link | string |
| author | string |
| authorIcon | string |
| authorId | string |
| authorLink | string |
| authorScreenName | string |
| initiativeIds | array[integer] |
| contentType | string |
| createdDate | string |
| followerCount | string |
| labels | string |
| notes | array[object] |
| inReplyTo | string |
| repostedFrom | string |
| parentPost | string |
Notes Object
| Field | Type | Description |
|---|---|---|
| text | string | The content of the note. |
| id | integer | |
| createdByDisplayName | string | The name of the user who created the note. |
| createdDate | string | The date and time the note was created. |
| lastModifiedByuserId | string or integer | The id of the user who last modified the note. |
| lastModifiedDate | string | The date and time the note was last modified. |
Example Response
{
"companyId": 1234,
"eventName": "stream-item-label-applied",
"createdDate": "Wed Apr 12 09:01:11 CDT 2017",
"uuid": "9d9da3d9-c2f8-483f-bd83-b541c9b2ff29",
"eventUuid": "67c53595-efc3-46aa-963b-89650bd4bd98",
"type": "hydrated",
"data": {
"labels": [],
"items": [
{
"sfEntityType": "StreamItem",
"entityId": "facebook:<facebookId>",
"text": "Post Text",
"link": "https://facebook.com/link",
"author": "author",
"authorIcon": "https://scontent.xx.fbcdn.net/v/t1.0-1/p50x50/profile_image",
"authorId": "12345678",
"authorLink": "https://facebook.com/author",
"authorScreenName": "author",
"initiativeIds": [
5
],
"contentType": "post",
"createdDate": "2011-05-26T18:23:31.000Z",
"followerCount": "8424",
"labels": [],
"notes": [],
"inReplyTo": "facebook:855485181481934848",
"repostedFrom": "facebook:855485181481934848",
"parentPost": "facebook:855485181481934848"
}
]
}
}
Updated 2 months ago