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
Field | Type |
---|---|
companyId | integer |
timeStamp | integer |
ruleMatched | object |
items | array[object] |
ruleMatched Object
Field | Type |
---|---|
ruleId | string |
ruleName | string |
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 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"
}
Updated over 2 years ago