Event: Rule Applied

Learn about the event created when a rule is applied to a social item.

Every time a rule is applied to a social item, this payload is sent in the rule-applied event.

Payload

FieldType
companyIdinteger
timeStampinteger
ruleMatchedobject
itemsarray[object]

ruleMatched Object

FieldType
ruleIdstring
ruleNamestring

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
textstring The content of the note.
idinteger
createdByDisplayNamestring The name of the user who created the note.
createdDatestring The date and time the note was created.
lastModifiedByuserIdstring or integer The ID of the user who last modified the note.
lastModifiedDatestring The date and time the note was last updated.

Example Response

{
	"companyId": 12345,
	"eventName": "rule-applied",
	"createdDate": "Fri May 19 10:36:42 CDT 2017",
	"eventUuid": "3ee0eeea-03ac-468b-8ec2-dfdb21ccaaec",
	"type": "hydrated",
	"data": {
		"companyId": 12345,
		"timeStamp": 0,
		"ruleMatched": {
			"ruleId": "testRuleId",
			"ruleName": "testRuleName"
		},
		"items": [
			{
				"sfEntityType": "StreamItem",
				"entityId": "twitter:12345",
				"text": "Post Test",
				"link": "http://twitter.com/uri",
				"author": "Author Name",
				"authorIcon": "https://pbs.twimg.com/profile_images/foo.jpg",
				"authorId": "123456",
				"authorLink": "http://twitter.com/handle",
				"authorScreenName": "handle",
				"initiativeIds": [
					1
				],
				"contentType": "post",
				"createdDate": "2009-06-29T23:43:18.000Z",
				"followerCount": "61",
				"labels": [],
				"notes": []
			}
		]
	},
	"subscriptionUuid": "8a33e123-546d-48e0-8097-f1fe4d208ffb"
}