Use the Bot v3 API to have the bot update both the author CRM attributes and author attributes
Details
Update author CRM attributes with a PUT request to /bots/v3/authors/attributes
.
{
"type":"author_attributes",
"coordinate":{
"companyKey":"<company-key>",
"networkKey":"brandmessenger",
"externalId":"<external-id>",
"messageId":"<message-id>",
"botId":"<bot-id>",
"scope":"PRIVATE"
}
},
"author":{
"id":"<author-id>"
},
"payload":{
"handles":{
"crm":[
{
"id":"<external-crm-id>",
"networkinstance":"<identifier-for-external-crm>",
"crmProperty1":"value"
}
]
}
}
}
{
"type": "author_attributes",
"coordinate": {
"companyKey": "<company-key>",
"networkKey": "brandmessenger",
"externalId": "<external-id>",
"networkInstance": "<network-instance-url>",
"messageId": "<message-id>",
"botId": "<bot-id>",
"scope": "PRIVATE"
},
"author": {
"id": "<author-id>"
},
"payload": {
"attributes": {
"birthday" : ["<birth-date-of-the-author>"],
"occupation" : ["<author-occupation>"],
"name" : ["<name-of-the-author>"],
"socialnetwork" : ["instagram"],
"attributeproperty1" : ["value"]
}
}
}
Author CRM JSON payload fields
type | The payload type. Always |
coordinate | A Coordinate object. This is object contains details about the bot and the message in context. It is used by Khoros Care. |
author | An Author object representing the message author on the source channel. |
payload | Author CRM update payload. Consists of a |
payload.handles | Pass the CRM handle(s) for the author in a
Additional key-value properties that are supported for the networkinstance can be set here as well. |
Author Attributes JSON payload fields
Field | Description |
---|---|
type | The payload type. Always |
coordinate | A Coordinate object. This is object contains details about the bot and the message in context. It is used by Khoros Care. |
author | An Author object representing the message author on the source channel. |
payload | Author CRM update payload. Consists of a |
payload.attributes | Pass the different author attributes such as name, occupation, birthday.Additional key-value properties that are supported for the networkinstance can be set here as well. |