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

FieldType
labelsarray[string]
itemsarray[object]

Items Object

FieldType
sfEntityTypestring
entityIdstring
textstring
linkstring
authorstring
authorIconstring
authorIdstring
authorLinkstring
authorScreenNamestring
initiativeIdsarray[integer]
contentTypestring
createdDatestring
followerCountstring
labelsstring
notesarray[object]
inReplyTostring
repostedFromstring
parentPoststring

Notes Object

FieldTypeDescription
textstringThe content of the note.
idinteger
createdByDisplayNamestringThe name of the user who created the note.
createdDatestringThe date and time the note was created.
lastModifiedByuserIdstring or integerThe id of the user who last modified the note.
lastModifiedDatestringThe 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": "twitter:<twitterId>",
				"text": "Post Text",
				"link": "https://twitter.com/link",
				"author": "author",
				"authorIcon": "https://pbs.twimg.com/profile_images",
				"authorId": "12345678",
				"authorLink": "https://twitter.com/author",
				"authorScreenName": "author",
				"initiativeIds": [
					5
				],
				"contentType": "post",
				"createdDate": "2011-05-26T18:23:31.000Z",
				"followerCount": "8424",
				"labels": [],
				"notes": [],
				"inReplyTo": "twitter:855485181481934848",
				"repostedFrom": "twitter:855485181481934848",
				"parentPost": "twitter:855485181481934848"
			}
		]
	}
}