Standard Fields for CRM Objects
The following is a list of standard fields from CRM objects that are returned in the Bright Pattern Search Object block.
Note: Custom fields are stored with the custom_ prefix.
Activity History
_id
Identifier of the given activity history object
Example: _id: ObjectId("58c37dc25be74141236fc250")
account_id
For email activities, returns the internal identifier of the email scenario entry
Example: account_id: "B5A69B62-9E37-48A0-8864-5E71E19148EE"
assigned_by_first_name
Reserved
assigned_by_last_name
Reserved
assigned_by_user_id
Reserved
assigned_from_first_name
Reserved
assigned_from_last_name
Reserved
assigned_from_user_id
Reserved
case_ids
Returns identifiers of cases that the given activity relates to; note the following:
- For chat and voice interactions, it may take multiple interactions to resolve a case
- For email interactions and notes, a single case is allowed
Example: case_ids: [ObjectId("58b744a27477eb6d1076e645")]
created_time
For chat and voice interactions, returns the time at which the interaction started (i.e., when it was first detected in the system); for email interactions and notes, returns the time at which this record was created (e.g., inbound email was received, outbound email was sent)
Example: created_time: ISODate("2016-10-14T01:39:38.326Z")
direction
For interaction-handling activities, provides a media-specific direction; it displays one of the following: INBOUND, OUTBOUND, REPLY, FORWARD, AUTO_ACK
Note the following:
- For chat interactions, it displays either INBOUND or OUTBOUND
- For email interactions, it may display INBOUND, OUTBOUND, REPLY, FORWARD, or AUTO_ACK
- For voice interactions, it displays either INBOUND or OUTBOUND
Example: direction: "OUTBOUND"
email_id
For email activities, returns the ID of the current email interaction
Example: email_id: ObjectId("579a651f7477eb3c65b652d8")
event
Reserved
flagged
Indicates whether an activity history record is flagged in the activity history of a case
Example: flagged: false
global_interaction_id
For interaction-handling activities, returns the global interaction identifier (GIID)
Example: global_interaction_id: "E9FF0804-A1E9-47CF-8D2F-60E684B21657"
has_voice_recording
If voice recordings are enabled, this indicates whether the interaction has a voice recording.
Example: has_voice_recording: false
media_type
Returns a value that indicates the type of interaction, which include the following: EMAIL, CHAT, VOICE, CASE, or NOTES
Example: media_type: "EMAIL"
original_email
For email activities, returns the ID of the original email interaction in the case
Example: original_email_id: ObjectId("5790099c7477eb673f327780")
parties
This returns an array of values associated with the parties involved in the activity; the party type will be one of the following: CONTACT, SCENARIO, USER, or UNIDENTIFIED. Note that USER applies to agents and supervisors.
Example:
parties: [ { party_type: 'USER', user_id: "93B68CAB-9271-4B0A-AFB6-B9238CD36875", first_name: "Edna", last_name: "Partee", notes: "", disposition: "Product sold", party_id: "58c1e0297477eb3f8d6552ec", start_time: ISODate("2017-03-14T19:15:06.784Z"), duration: 338, custom_address_verified: true, custom_name_verified: true service_id: "72452D33-A7B4-4A1A-914A-AFA4076A76C3", } { party_type: 'CONTACT', contact_id: ObjectId("552856a7e4b0acb4156ddd11"), first_name: "John", last_name: "Doe", email: "john.doe@example.com", party_id: "58c1e7137477eb3f8d655322", start_time: ISODate("2017-03-14T19:15:44.784Z"), duration: 300 } { party_type: 'UNIDENTIFIED', first_name: 'Wireless', last_name:'Caller', phone: '14155551212' } { party_type: 'SCENARIO', custom_address_verified: true, custom_name_verified: true } ]
pinned
Indicates whether an activity history record is pinned in the activity history of a case
Example: pinned: false
services
Provides a list of services that were involved in an activity; note that this is separate from the parties property because services may exist on abandoned/self-service attempts where there were no agent parties.
Example:
services: [ { service_id: "72452D33-A7B4-4A1A-914A-AFA4076A76C3", service_name: "Maintenance Renewal" } ]
subject
Returns the subject of the conversation
Example: subject: "TEST SUBJECT"
tenant_id
Returns the ID of the contact center
Example: tenant_id: "EB95E6C6-A7A9-4581-83E7-7336FB8FC377"
thread_id
Returns the email thread ID, if configured
Example: thread_id: "JX54YYN91FZH"
transferred_from_first_name
Reserved
transferred_from_last_name
Reserved
transferred_from_user_id
Reserved
Case
case_number
The case number as defined in the Agent Desktop application
Example: case_number: "2451"
case_status
Returns one of the following case states: New, Open, Pending, Resolved, or Closed
Example: case_status: "Pending"
case_title
Case title, for emails, is copied from the original email subject line; agents can edit it when editing cases
Example: case_title: "Mid-april Bulk email #1060 on Mon Oct 19 15:49:28 PDT 2015"
category_id
Returns the ID of the case category
Example: category_id: "560AC234-D124-458F-8DFB-C11ADF48F1D2"
category_name
Returns the configured case category
Example: category_name: "Maintenance Renewal"
cc
Provides a list of on-copy contacts
Example:
cc: [ { contact_id: "5800375a7477eb4f25c630a7", first_name: "Jane", last_name: "Doe" } ]
created_time
When the case was first created; time is in GMT
Example: created_time: ISODate("2015-10-19T22:50:22.565Z")
customer_update_time
For email, this states when the last customer email was received. For voice and chat interactions, it coincides with the modified_time property.
Example: customer_update_time: ISODate("2016-11-03T23:49:41.454Z")
is_flagged
Indicates if a case is flagged; it is unrelated to the interaction flag
Example: is_flagged: true
is_pinned
Indicates if the case is pinned; it is unrelated to email pins
Example: is_pinned: true
modified_time
This provides the time when the last update on the case was made or a new activity was posted on the case. Typically, this reflects the end of the interaction (i.e., when an update is done); time is in GMT.
Example: modified_time: ISODate("2016-11-03T23:49:41.454Z")
open_time
Provides the time when the case was opened by the agent (i.e., when the its state is changed from the New state to the Open state)
Example: open_time: ISODate("2015-10-19T22:51:22.565Z")
pending_reason
Returns the contact center's configured Pending reasons; these are only present if a case is in the Pending state.
Example: pending_reason: "Waiting for info from customer"
pending_time
The time the case state was last set to Pending. The pending_time property is only present in cases in the Pending, Resolved, and Closed states. For multiple transitions to the Pending state, it will provide the time the last transition was used.
Example: pending_time: ISODate("2015-10-19T22:53:22.565Z")
priority
Reserved
reporter_first_name
The reporter’s (i.e., the customer/ person who contacted your call center) first name as it was at the moment it was collected
Example: reporter_first_name: "John"
reporter_id
The ID of the case reporter (i.e., the customer/ person who contacted your call center); it is taken from the contact on the original interaction from the case
Example: reporter_id: ObjectId("5581ef0de4b02187dd0a555f")
reporter_last_name
The reporter’s (i.e., the customer/ person who contacted your call center) last name as it was at the moment it was collected
Example: reporter_last_name: "Doe”
resolved_time
The time the case state was set to Resolved; it is used for automatic transition to the Closed state. The resolved_time property is only present in cases in the Resolved and Closed states. For multiple transitions to the Resolved state, it will provide the time the last transition was used.
Example: resolved_time: ISODate("2016-11-03T23:49:41.454Z")
response_sla_start_time
Reserved
response_sla_target_time
Reserved
response_sla_time
Reserved
sentiment
Provides the sentiment from the last customer interaction in numerical form; the score indicates how negative or positive the interaction was, based on sentiment analysis
Example: sentiment: 0.97
tenant_id
Returns the ID of the contact center
Example: tenant_id: "EB95E6C6-A7A9-4581-83E7-7336FB8FC377"
users
This provides a list of agents who have participated in the handling of this case.
Example:
users: [ user_id: "93B68CAB-9271-4B0A-AFB6-B9238CD36875" ]
Company
company_name
The name of the company as defined in Agent Desktop
Example: company_name: "Warehousing Inc. 4"
created_time
When this company object was first created; time is in GMT
Example: created_time: ISODate("2015-03-24T23:57:13.440Z")
employees
The number of employees the company has as defined in Agent Desktop
Example: employees: "123"
modified_time
This provides the time when the last update for this company object was made; time is in GMT.
Example: modified_time: ISODate("2016-10-06T21:22:29.850Z")
revenue
The revenue of the company as defined in Agent Desktop
Example: revenue: "100 million"
tenant_id
Returns the ID of the contact center
Example: tenant_id: "EB95E6C6-A7A9-4581-83E7-7336FB8FC377"
web_url
The company’s web URL as defined in Agent Desktop
Example: web_url: "www.example.com"
Contact
addresses
The contact’s addresses as defined in Agent Desktop; possible values are PRIMARY, BILLING, SHIPPING, and OTHER
Example:
addresses: [ { type: "PRIMARY", postcode: "90670", state: "CA", city: "Santa Fe Springs", address_line1: "1111 Bayhill Dr.", address_line2: "Suite 275", country: "USA", id: "579936537477eb39496a4bea" } ]
bpo_client_id
Reserved
company_id
Returns the ID of the company that this contact is associated with
Example: company_id: ObjectId("5511f9d9e4b0033ff9b8bc99")
created_time
When the contact was first created; time is in GMT
Example: created_time: ISODate("2015-04-10T23:03:03.322Z")
dob
The contact’s date of birth (DOB) as defined in Agent Desktop
Example: dob: ISODate("2001-08-14T00:00:00.000Z")
emails
The contact’s email addresses as defined in Agent Desktop; possible values are PRIMARY, BUSINESS, and PRIVATE
Example:
emails: [ { type: "PRIMARY", email_address: "something@brightpattern.com", id: "579936537477eb39496a4be9" } ]
external_ids
Reserved
first_name
The contact’s first name as defined in Agent Desktop
Example: first_name: "Jeanne"
last_name
The contact’s last name as defined in Agent Desktop
Example: last_name: "Wengler"
messengers
The contact's messenger information, including messenger name/type (e.g., LINE), the contact center’s integration account ID, and the contact’s external messenger ID.
Example:
messengers [ { type: "line", id: "3289396573", user_id: "U6b4b0a5c0e5a0269fcba1b06ccf09ea5" }, { type: "facebook", id: "4937586736", user_id: "X7a3c1b6d1f6b1370gdcb2c17bbg10fb6" } ]
modified_time
This provides the time when the last update on the contact was made; time is in GMT.
Example: modified_time: ISODate("2016-09-24T00:11:48.205Z")
phone
The contact’s phone numbers as defined in Agent Desktop; possible values are BUSINESS, HOME, MOBILE, and FAX
Example:
phones: [ { type: "MOBILE", phone: "16505551212", id: "579fff287477eb45790af319" }, { type: "HOME", phone: "14155551212", id: "57e2d6437477eb660c92899d" }, ]
picture
Contact’s photo
position
The contact’s position as defined in Agent Desktop
Example: position: "Sr. Support Engineer"
segment
The contact’s segment as defined in Agent Desktop
Example: segment: "Gold"
social_links
Reserved
summary
The summary of the contact as defined in Agent Desktop
Example: summary: "Jeanne works in the main office M - Th; off-site office F"
tenant_id
Returns the ID of the contact center
Example: tenant_id: "EB95E6C6-A7A9-4581-83E7-7336FB8FC377"
title
The contact’s title as defined in Agent Desktop
Example: title: "Miss"
CC
Returns the names and email addresses of the email’s Cc field in an array of objects, if available
Example:
CC: [ { “name”: “Alice B”, “address”: “alice@b.com” } ]
From
Returns the names and email addresses of the email’s From field in an array of objects
Example:
From: [ { “name”: “Alice B”, “address”: “alice@b.com” } ]
HTML
Returns the string from the email’s HTML body, if available; returns an array if the email object contains several HTML parts
Example:
html: "<div class=\"x-eml-message x-eml-level-0\" lang=\"EN-US\" link=\"blue\" vlink=\"purple\"> \n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=us-ascii\" />\n <meta name=\"Generator\" content=\"Microsoft Word 14 (filtered medium)\" />\n <style><!--\r\n/* Font Definitions */\r\n@font-face\r\n\t{font-family:\"Cambria Math\";\r\n\tpanose-1:2 4 5 3 5 4 6 3 2 4;}\r\n@font-face\r\n\t{font-family:Calibri;\r\n\tpanose-1:2 15 5 2 2 2 4 3 2 4;}\r\n/* Style Definitions */\r\np.MsoNormal, li.MsoNormal, div.MsoNormal\r\n\t{margin:0in;\r\n\tmargin-bottom:.0001pt;\r\n\tfont-size:11.0pt;\r\n\tfont-family:\"Calibri\",\"sans-serif\";}\r\na:link, span.MsoHyperlink\r\n\t{mso-style-priority:99;\r\n\tcolor:blue;\r\n\ttext-decoration:underline;}\r\na:visited, span.MsoHyperlinkFollowed\r\n\t{mso-style-priority:99;\r\n\tcolor:purple;\r\n\ttext-decoration:underline;}\r\nspan.EmailStyle17\r\n\t{mso-style-type:personal-compose;\r\n\tfont-family:\"Calibri\",\"sans-serif\";\r\n\tcolor:windowtext;}\r\n.MsoChpDefault\r\n\t{mso-style-type:export-only;\r\n\tfont-family:\"Calibri\",\"sans-serif\";}\r\n@page WordSection1\r\n\t{size:8.5in 11.0in;\r\n\tmargin:1.0in 1.0in 1.0in 1.0in;}\r\ndiv.WordSection1\r\n\t{page:WordSection1;}\r\n--></style>\n <!--[if gte mso 9]><xml>\r\n<o:shapedefaults v:ext=\"edit\" spidmax=\"1026\" />\r\n</xml><![endif]-->\n <!--[if gte mso 9]><xml>\r\n<o:shapelayout v:ext=\"edit\">\r\n<o:idmap v:ext=\"edit\" data=\"1\" />\r\n</o:shapelayout></xml><![endif]-->\n <div class=\"WordSection1\">\n <p class=\"MsoNormal\">\n <o:p>\n \n </o:p></p>\n </div>\n</div>"
Subject
Returns the string from the email’s Subject field, if available
Example: Subject : "10/20 attempt #3"
Text
Returns the string from the email’s text body, if available; returns an array if the email object contains several HTML parts
Example: text : "\r\n\r\n"
To
Returns the email addresses and names (if available) of the email’s To field in an array of objects
Example:
To: [ { “address”: “alice@b.com” }
]