MessagingSession
Represents a session on a Messaging channel.
Introduced in API version 40.0.
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update(), upsert()
- Type: datetime
- Properties: Create, Filter, Nillable, Sort, Update
- Description: The time when an agent accepts an incoming Messaging session.
- Type: int
- Properties: Nillable
- Introduced: API version 45.0
- Description: The number of messages sent by the agent during the session.
- Type: picklist
- Properties: Create, Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
- Introduced: API version 44.0
- Description: The type of agent that is assigned to the Messaging session.
- Possible values:
- Agent — Agent
- Bot — Bot
- BotToAgent — BotToAgent — Bot & Agent
- System — System — Used for triggered outbound messages
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 66.0
-
Description:
The ID of the related campaign.
This field is a relationship field.
-
Relationship name: Campaign
-
Relationship type: relationship
-
Refers to: Campaign
- Type: reference
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Description: The ID of the case associated with this Messaging session.
- Relationship name: Case
- Relationship type: relationship
- Refers to: Case
- Type: string
- Properties: Filter, Group, idLookup, Nillable, Sort
- Introduced: API version 44.0
- Description: A concatenation of the Messaging channel and Messaging user.
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 46.0
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 46.0
- Type: string
- Properties: Filter, Group, Nillable, Sort
- Introduced: API version 43.0
- Description: The unique identifier for the associated Messaging channel.
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Introduced: API version 46.0
- Description: The locale of the associated Messaging channel.
- Type: string
- Properties: Filter, Group, Nillable, Sort
- Introduced: API version 43.0
- Description: The name of the associated Messaging channel.
- Type: picklist
- Properties: Filter, Group, Nillable, Restricted picklist, Sort
- Introduced: API version 43.0
- Description: The type of the associated Messaging channel.
- Possible values:
- Alexa — Alexa
- AppleBusinessChat — AppleBusinessChat — Represents Apple Messages for Business.
- Email — Email
- EmbeddedMessaging — EmbeddedMessaging — Available in API version 55.0 and later.
- Facebook — Facebook
- GoogleHome — GoogleHome
- Line — Line
- Omega — Omega
- Phone — Phone
- Text — Text
- Voice — Voice
- WeChat — WeChat
- WebChat — WebChat
- WhatsApp — WhatsApp
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort
-
Introduced: API version 47.0
-
Description:
The ID of the related conversation.
This field is a relationship field.
-
Relationship name: Conversation
-
Relationship type: relationship
-
Refers to: Conversation
- Type: datetime
- Properties: Create, Filter, Nillable, Sort
- Description: The time when the Messaging session ended.
-
Type: reference
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 43.0
-
Description:
The ID of the end user’s account record.
This is a relationship field.
-
Relationship name: EndUserAccount
-
Relationship type: relationship
-
Refers to: Account
-
Type: reference
-
Properties: Filter, Group, Nillable, Sort
-
Introduced: API version 43.0
-
Description:
The ID of the end user’s contact record.
This is a relationship field.
-
Relationship name: EndUserContact
-
Relationship type: relationship
-
Refers to: Contact
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort, Update
- Introduced: API version 61.0
- Description: The preferred language of the messaging user who participated in the messaging session.
- Type: int
- Properties: Nillable
- Introduced: API version 45.0
- Description: The number of messages sent by the Messaging end user.
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort
- Introduced: API version 61.0
- Description: Who or what ended the enhanced messaging session.
- Possible values:
- Agent — Agent
- Bot — Bot
- EndUser — EndUser
- System — System
- Type: reference
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Description: The ID of the Lead associated with this Messaging session.
- Relationship name: Lead
- Relationship type: relationship
- Refers to: Lead
-
Type: reference
-
Properties: Create, Filter, Group, Sort
-
Description:
The ID of the Messaging channel associated with this Messaging session.
This is a relationship field.
-
Relationship name: MessagingChannel
-
Relationship type: relationship
-
Refers to: MessagingChannel
-
Type: reference
-
Properties: Create, Filter, Group, Sort
-
Description:
The ID of the Messaging end user associated with this Messaging session.
This is a relationship field.
-
Relationship name: MessagingEndUser
-
Relationship type: relationship
-
Refers to: MessagingEndUser
- Type: string
- Properties: Autonumber, Defaulted on create, Filter, idLookup, Sort
- Description: The name of this Messaging session.
- Type: reference
- Properties: Create, Filter, Group, Nillable, Sort, Update
- Description: The ID of the opportunity record associated with this Messaging session.
- Relationship name: Opportunity
- Relationship type: relationship
- Refers to: Opportunity
- Type: picklist
- Properties: Create, Defaulted on create, Filter, Group, Restricted picklist, Sort
- Introduced: API version 43.0
- Description: The origin of this Messaging session. Messaging sessions can’t be created using Apex code. They can be created only through customer initiation or by using Process Builder, flows, or the Start Conversation action.
- Possible values:
- AgentInitiated — AgentInitiated
- ConversationClose — ConversationClose — Messaging user deleted the conversation in Apple Messages
- ConversationControlLost — ConversationControlLost — Third-party bot resumes control from Salesforce bot or agent
- Help — Help
- InboundInitiated — InboundInitiated
- OptIn — OptIn — Opt In Status Change
- OptOut — OptOut — Opt Out Status Change
- TriggeredOutbound — TriggeredOutbound
- Type: string
- Properties: Nillable
- Introduced: API version 43.0
- Description: The preview shown to an agent for this Messaging session.
- Type: string
- Properties: Create, Filter, Group, Nillable, Sort
- Introduced: API version 44.0
- Description: The identifier for the Messaging session.
- Type: datetime
- Properties: Create, Filter, Nillable, Sort
- Description: The time when the Messaging session started.
- Type: picklist
- Properties: Create, Filter, Group, Restricted picklist, Sort
- Description: The status of the Messaging session. To learn more about these statuses, see Lifecycle of a Messaging Session in Salesforce Help.
- Possible values:
- New — New
- Active — Active
- Consent — Consent
- Waiting — Waiting
- Paused — Paused
- Inactive — Inactive
- Ended — Ended
- Error — Error
- Type: picklist
- Properties: Create, Filter, Group, Nillable, Restricted picklist, Sort
- Introduced: API version 67.0
-
Type: reference
-
Properties: Create, Filter, Group, Nillable, Sort, Update
-
Introduced: API version 46.0
-
Description:
The ID of the target user associated with this Messaging session.
This is a relationship field.
-
Relationship name: TargetUser
-
Relationship type: relationship
-
Refers to: User
To monitor messaging session activity, report on the MessagingSession and MessagingSessionMetrics objects. MessagingSessionMetrics captures metrics about a messaging session, such as agent and end user response time. See Report on Messaging Activity in Service Cloud.
This object has the following associated objects. If the API version isn’t specified, they’re available in the same API versions as this object. Otherwise, they’re available in the specified API version.
-
MessagingSessionChangeEvent: Introduced in API version 62.0.