Records a sale for a communication
| Method | set.tag_sales |
|---|---|
| Description | Records a sale for a communication |
| Who has access | Agents and clients |
This method is available only when the Account Sales option is enabled for the website.
Request parameters
| Name | Type | Required | Valid values | Description |
|---|---|---|---|---|
access_token |
string | yes | Session key used to authenticate the request | |
user_id |
number | no | Unique ID of the client user on whose behalf the request is made. Required when an agent makes the request. To retrieve a list of client users, call "get.customer_users". | |
communication_id |
number | yes | Unique communication ID. Use this ID to retrieve detailed information with "get.communications_report", "get.chats_report", "get.goals_report", "get.offline_messages_report", or "get.calls_report". | |
communication_type |
enum | yes | chat call goal offline_message |
Communication type |
date_time |
iso8601 | yes | YYYY-MM-DD hh:mm:ss | Date and time of the transaction. Must not be earlier than the communication date. |
transaction_value |
number | yes | Transaction amount | |
comment |
string | no | Up to 255 characters | Optional transaction comment |
Response parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
number | yes | Unique sale ID |
Example request
{
"jsonrpc":"2.0",
"id":"number",
"method":"set.tag_sales",
"params":{
"access_token":"string",
"user_id":"number",
"communication_id":"number",
"communication_type":"enum",
"date_time":"iso8601",
"transaction_value":"number",
"comment":"string"
}
}
Example response
{
"jsonrpc":"2.0",
"id":"number",
"result":{
"id":"number"
}
}
List of returned errors
See the "List of errors for set methods" section.