Skip to content

Get offline messages report

Getting information about offline messages

Method get.offline_messages_report
Description Getting information about offline messages
Who has access Partner, Customer

Parameters of a request

Title Type Required Valid value Description
access_token string yes Authentication session key
user_id number no Unique user ID of agent's customer who makes request
Is required for agent
To get 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 Sampling start date
date_till iso8601 yes YYYY-MM-DD hh:mm:ss Sampling end date

Parameters of a reply

Title Type Valid values Filtering Sorting Default reply Description
id number yes yes Offline message unique ID
date_time iso8601 YYYY-MM-DD hh:mm:ss Date and time when an offline message was received
text string yes Offline message text
communication_number number yes yes Offline message number. Estimated whithin 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.
communication_id number yes yes Communication unique ID
communication_type enum offline_message Communication type
ua_client_id string Unique ID in Universal Analytics
ym_client_id string User ID in Yandex.Metrika
sale_date iso8601 YYY-MM-DD hh:mm:ss yes yes Sale date
sale_cost number yes yes Sale cost
status enum
  • processing
  • processed
  • not_processed
yes yes yes Offline message status
process_time iso8601 YYYY-MM-DD hh:mm:ss Date and time when an offline message was transferred to the status "Processed" (refer to the parameter "status")
form_type enum User,
Standard,
DataAPI
yes yes yes Type of the form from which an offline message was sent
search_query string yes Search query
search_engine string yes Search engine name
referrer_domain string yes Referrer domain
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 yes Yandex Market Click Identifier
ef_id string yes Used to mark up links in contextual management system AdLense
channel enum
  • display
  • paid
  • affiliate
  • messenger
  • social
  • email
  • organic
  • internal
  • recommendation
  • cashed
  • referral
  • direct
yes Channel.
Group, chosen by visitors
group_id number yes yes Unique ID of a selected group
group_name string yes yes Name of a selected group
Employee
employee_id number yes yes yes Unique ID of an employee who processed an offline message
employee_full_name string yes yes Full name of an employee who processed an offline message
employee_answer_message string Reply of an employee sent to visitor's email
employee_comment string Comment of an employee when transferring an offline message into the status "Processed" (refer to the field "status")
Used tags
tags array yes Tags, refer to the method "get.tags"
tag_id number Tag ID
tag_name string Tag name
tag_change_time iso8601 YYYY-MM-DD hh:mm:ss Time when a tag was used
tag_type enum auto, manual Tag type
tag_user_id number Unique ID of a user who 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
Website
site_id number yes yes yes Website unique ID
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 Flag that shows whether or not a visitor visited website from other advertising campaigns (within person)
Information about visitor
visitor_phone_number number yes yes Visitor phone number left in the offline message
visitor_email string yes yes Email left by a visitor
visitor_name string yes yes Visitor name left in the offline message
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 Visitor's visits total count
visitor_first_campaign_id number yes First advertising campaign unique ID.
visitor_first_campaign_name string yes First advertising campaign name
visitor_city string yes Visitor city
visitor_country string yes Visitor country
visitor_region string yes Visitor region
visitor_device enum
    desktop mobile tablet other
yes yes User device
Visitor properties
visitor_custom_properties array yes Visitor properties that can be set in the client area or using JavaScript API [method CallGear.setProperty(name, value);]
property_name string Name of a property that's to be assigned to a visitor
property_value string Property value
Segments
segments array yes Segments
segment_id number Segment unique ID
segment_name string Segment name
UTM tags
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
OS tags
openstat_ad string yes Ad ID
openstat_campaign string yes Advertising campaign ID
openstat_service string yes Service provider
openstat_source string yes ID of a site, a section, a page, or a place on the page where an ad was shown
Offline message 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 Offline message attributes
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.offline_messages_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",
        "date_time":"iso8601",
        "text":"string",
        "communication_number":"number",
        "communication_page_url": "string",
        "communication_type":"enum",
        "communication_id":"number",
        "ua_client_id":"string",
        "ym_client_id": "string",
        "sale_date":"iso8601",
        "sale_cost":"number",
        "status":"enum",
        "process_time":"iso8601",
        "form_type":"enum",
        "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",
        "employee_id":"number",
        "employee_full_name":"string",
        "employee_answer_message":"string",
        "employee_comment":"string",
        "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_name":"string"
          }
        ],
        "site_id":"number",
        "site_domain_name":"string",
        "group_id":"number",
        "group_name":"string",
        "campaign_id":"number",
        "campaign_name":"string",
        "visit_other_campaign":"boolean",
        "visitor_id":"number",
        "visitor_name":"string",
        "visitor_phone_number":"number",
        "visitor_email":"string",
        "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"