Get communications report
Getting a list of all communications
Method |
get.communications_report |
Description |
Getting a list of all communications |
Who has access |
Partner, Customer |
Parameters of a request
Title |
Type |
Required |
Valid values |
Description |
access_token |
string |
yes |
|
Authentication session key |
user_id |
number |
no |
Unique ID of an agent's customer user who makes request Is required for agent To access a list of customer users, use the method "get.customer_users" |
|
limit |
number |
no |
|
Returning entries count. Refer to "Paging" |
offset |
number |
no |
|
Offset that defines from which number to return the entries "limit" . Default value is "0". Refer to "Paging" |
filter |
object |
no |
Refer to "Filters" |
|
fields |
array |
no |
Refer to "Viewing returning data" |
|
sort |
array |
no |
Refer to "Data sorting" |
|
date_from |
iso8601 |
yes |
YYYY-MM-DD hh:mm:ss |
Selection start date |
date_till |
iso8601 |
yes |
YYYY-MM-DD hh:mm:ss |
Selection end day |
Parameters of a reply
Title |
Type |
Valid values |
Filtering |
Sorting |
Default reply |
Description |
id |
number |
|
yes |
|
yes |
Communication unique ID. To get detailed information on each communication type, you can use the following methods: "get.chats_report" ,
"get.goals_report" , "get.offline_messages_report" , "get.calls_report"
|
communication_type |
enum |
chat , call , goal ,
offline_message
|
yes |
yes |
yes |
Communication type. To get detailed information on each communication type, you can use the following methods: "get.chats_report" ,
"get.goals_report" , "get.offline_messages_report" , "get.calls_report"
|
communication_number |
number |
|
yes |
yes |
|
Communication number.
Is calculated for a person.
|
communication_page_url |
string |
|
no |
no |
no |
URL of the webpage where a visitor was at the time of communication or the page of the last interaction with a visitor before comminication.
|
date_time |
iso8601 |
YYYY-MM-DD hh:mm:ss |
yes |
yes |
yes |
Communication time and date |
ua_client_id |
string |
|
|
|
|
Unique ID in the Universal
Analytics |
ym_client_id |
string |
|
|
|
|
User unique ID in Yandex.Metrika |
sale_date |
iso8601 |
YYYY-MM-DD hh:mm:ss |
yes |
yes |
|
Sale date |
sale_cost |
number |
|
yes |
yes |
|
Sale cost |
search_query |
string |
|
yes |
|
|
Search query |
search_engine |
string |
|
yes |
|
|
Search engine name |
referrer_domain |
string |
|
yes |
|
|
Domain referrer |
referrer |
string |
|
yes |
|
|
Referral source |
entrance_page |
string |
|
yes |
|
|
Entrance page |
gclid |
string |
|
yes |
|
|
Google Click Identifier |
yclid |
string |
|
yes |
|
|
Yandex Click Identifier |
ymclid |
string |
|
|
|
|
Yandex Market Click
Identifier |
ef_id |
string |
|
yes |
|
|
Is used to mark links in the contextual advertising management system AdLense |
channel |
enum |
display
paid
affiliate
messenger
social
email
organic
internal
recommendation
cashed
referral
direct
|
yes |
|
|
Channel. |
Used tags |
tags |
array |
|
yes |
|
|
Tags, refer to the method "get.tags" |
tag_id |
number |
|
|
|
|
Tag unique ID |
tag_name |
string |
|
|
|
|
Tag name |
tag_type |
enum |
auto , manual |
|
|
|
Tag type |
tag_change_time |
iso8601 |
YYYY-MM-DD hh:mm:ss |
|
|
|
Date and time of using a tag |
tag_user_id |
number |
|
|
|
|
Unique ID of a user that used a tag |
tag_user_login |
string |
|
|
|
|
Login of a user who used a tag |
tag_employee_id |
number |
|
|
|
|
Unique ID of an employee who used a tag |
tag_employee_full_name |
string |
|
|
|
|
Full name of an employee who used a tag |
Information about visitor |
visitor_id |
number |
|
yes |
yes |
yes |
Visitor unique ID |
person_id |
number |
|
yes |
|
yes |
Person unique ID |
visitor_type |
enum |
New, Returned, Not filled in |
yes |
yes |
|
Visitor type |
visitor_session_id |
number |
|
yes |
|
yes |
Visitor session unique ID, refer to "get.visitor_sessions_report" |
visits_count |
number |
|
yes |
|
|
Visits count |
visitor_first_campaign_id |
number |
|
yes |
|
|
First advertising campaign ID. |
visitor_first_campaign_name |
string |
|
yes |
|
|
First advertising campaign name |
visitor_city |
string |
|
yes |
|
|
City of a visitor |
visitor_region |
string |
|
yes |
|
|
Region of a visitor |
visitor_country |
string |
|
yes |
|
|
Country of a visitor |
visitor_device |
enum |
desktop
mobile
tablet
other
|
yes |
yes |
|
User device |
Properties of a user |
visitor_custom_properties |
array |
|
yes |
|
|
User properties,
which you can set in your client area or via JavaScript API [method CallGear.setProperty(name, value); ]
|
property_name |
string |
|
|
|
|
Name of a property that should be assigned to a visitor
|
property_value |
string |
|
|
|
|
Property value |
Website |
site_id |
number |
|
yes |
yes |
yes |
Unique ID of a website |
site_domain_name |
string |
|
yes |
|
|
Website address on the internet.
Without protocol -
"http://" or "https://"
|
Advertising campaign |
campaign_id |
number |
|
yes |
yes |
yes |
Advertising campaign unique ID |
campaign_name |
string |
|
yes |
|
|
Advertising campaign name |
visit_other_campaign |
boolean |
true , false |
yes |
|
|
Flag that shows whether or not a visitor visited website from other advertising campaigns (within person) |
Segments |
segments |
array |
|
yes |
|
|
Segments
|
segment_name |
string |
|
|
|
|
Segment name |
segment_id |
number |
|
|
|
|
Segment ID |
UTMs |
utm_source |
string |
|
yes |
|
|
Campaign source |
utm_medium |
string |
|
yes |
|
|
Campaign channel |
utm_term |
string |
|
yes |
|
|
Campaign key word |
utm_content |
string |
|
yes |
|
|
Campaign content |
utm_campaign |
string |
|
yes |
|
|
Campaign name |
utm_referrer |
string |
|
yes |
|
|
Site referral source |
utm_expid |
string |
|
yes |
|
|
Google Analytics experiment ID |
OS tags |
openstat_ad |
string |
|
yes |
|
|
Ad ID |
openstat_campaign |
string |
|
yes |
|
|
Advertising campaign ID |
openstat_service |
string |
|
yes |
|
|
Service provider ID |
openstat_source |
string |
|
yes |
|
|
ID of a site, a section, a page, or a place on the page where an ad was shown |
Communication attributes |
attributes |
array |
first - First quality
through - Through first quality
primary - Primary
secondary - Secondary
lost - Lost
target - Target
off-target - Off target
quality - Quality
rest - Recurring target communications (communications, happened during a second communication, set for a website in CallGear client area).
|
yes |
|
|
Communication attribute |
Expanded UTM tags |
eq_utm_source |
string |
|
yes |
|
|
Expanded utm_source |
eq_utm_medium |
string |
|
yes |
|
|
Expanded utm_medium |
eq_utm_term |
string |
|
yes |
|
|
Expanded utm_term |
eq_utm_content |
string |
|
yes |
|
|
Expanded utm_content |
eq_utm_campaign |
string |
|
yes |
|
|
Expanded utm_campaign |
eq_utm_referrer |
string |
|
yes |
|
|
Expanded utm_referrer |
eq_utm_expid |
string |
|
yes |
|
|
Expanded utm_expid |
JSON request structure
{
"jsonrpc":"2.0",
"id":"number",
"method":"get.communications_report",
"params":{
"access_token":"string",
"user_id":"number",
"offset":"number",
"limit":"number",
"date_from":"iso8601",
"date_till":"iso8601",
"filter":{
},
"sort":[
{
"field":"string",
"order":"string"
}
],
"fields":[
"string"
]
}
}
JSON reply structure
{
"jsonrpc":"2.0",
"id":"number",
"result":{
"metadata":{
},
"data":[
{
"id":"number",
"communication_type":"enum",
"communication_number":"number",
"communication_page_url": "string",
"date_time":"iso8601",
"ua_client_id":"string",
"ym_client_id": "string",
"sale_date":"iso8601",
"sale_cost":"number",
"search_query":"string",
"search_engine":"string",
"referrer_domain":"string",
"referrer":"string",
"entrance_page":"string",
"gclid":"string",
"yclid":"string",
"ymclid":"string",
"ef_id":"string",
"channel":"enum",
"tags":[
{
"tag_id":"number",
"tag_name":"string",
"tag_type":"enum",
"tag_change_time":"iso8601",
"tag_user_id":"number",
"tag_user_login":"string",
"tag_employee_id":"number",
"tag_employee_full":"string"
}
],
"site_id":"number",
"site_domain_name":"string",
"campaign_id":"number",
"campaign_name":"string",
"visit_other_campaign":"boolean",
"visitor_id":"number",
"person_id":"number",
"visitor_type":"enum",
"visitor_session_id":"number",
"visits_count":"number",
"visitor_first_campaign_id":"number",
"visitor_first_campaign_name":"string",
"visitor_city":"string",
"visitor_region":"string",
"visitor_country":"string",
"visitor_device":"enum",
"visitor_custom_properties":[
{
"property_name":"string",
"property_value":"string"
}
],
"segments":[
{
"segment_id":"number",
"segment_name":"string"
}
],
"utm_source":"string",
"utm_medium":"string",
"utm_term":"string",
"utm_content":"string",
"utm_campaign":"string",
"openstat_ad":"string",
"openstat_campaign":"string",
"openstat_service":"string",
"openstat_source":"string",
"eq_utm_source": "string",
"eq_utm_medium": "string",
"eq_utm_term": "string",
"eq_utm_content": "string",
"eq_utm_campaign": "string",
"eq_utm_referrer": "string",
"eq_utm_expid": "string",
"attributes":[
]
}
]
}
}
List of returning errors
Refer to the section "List of errors for the methods with the verb get"