This document outlines the process to identify the customer's initial intent even after the conversation is transferred to LivePerson.
The option presented below cover various methods or solutions to achieve the desired outcome.
Option #1: Identify by Skill (Messaging Interaction API)
To implement this option, you can utilize the Messaging Interaction API to retrieve skill information.
Considerations:
- Conversation should be started at skill, and skill should be mapped to intent.
- There are 2 cases for this option.
Case 1: When a conversation starts and isn't transferred:
- Check the length of the "transfers" array. If it's 0, it means there were no transfers.
- In this case, you can find skill data
latestSkillName
and latestSkillId
within the "info" object. This data includes information like startTime
, endTime
, duration
, conversationID
, etc.
javascript:
// Case 1: Conversation started and not transferred
"info": {
"startTime": "2024-01-30 09:55:59.192+0000",
"startTimeL": 1706608559192,
"endTime": "undefined",
"endTimeL": -1,
"duration": 633948,
"conversationId": "d708abfc-66aa-4c8e-8b88-83a5762d5013",
"brandId": "58079674",
"latestAgentId": "2019359730",
"latestAgentNickname": "nickname_vbolibruk",
"latestAgentFullName": "name_vbolibruk",
"latestAgentLoginName": "vbolibruk",
"agentDeleted": false,
"latestSkillId": 3817388538,
"latestSkillName": "analisis",
Case 2: Conversation Started and Transferred
- Check the "transfers" array to get the context of the skills involved in the transfer.
- Each transfer object within the array contains details about the transfer, such as the
time
, source skill sourceSkillName
, target skill targetSkillName
, reason
for transfer, etc.
javascript:
// Case 2: Conversation started and transferred
"transfers": [
{
"timeL": 1704305305921,
"time": "2024-01-03 18:08:25.921+0000",
"assignedAgentId": "null",
"targetSkillId": 3483494730,
"targetSkillName": "Core Mobile",
"reason": "Skill",
"by": "3488963030",
"sourceSkillId": 3483502630,
"sourceSkillName": "LP Prod Routing Bot",
"sourceAgentId": "3488963030",
"sourceAgentFullName": "mobilebot1",
"sourceAgentLoginName": "mobilebot1",
"sourceAgentNickname": "Navy Federal",
"dialogId": "006a5df9-b109-45cd-80c6-4a30fbcd553b"
},
{
"timeL": 1704305503055,
"time": "2024-01-03 18:11:43.055+0000",
"assignedAgentId": "null",
"targetSkillId": 3483496230,
"targetSkillName": "Credit Card Mobile",
"reason": "Skill",
"by": "4073883838",
"sourceSkillId": 3483494730,
"sourceSkillName": "Core Mobile",
"sourceAgentId": "4073883838",
"sourceAgentFullName": "Joyce Riley_42609_Mobile",
"sourceAgentLoginName": "42609_M",
"sourceAgentNickname": "Joyce",
"dialogId": "006a5df9-b109-45cd-80c6-4a30fbcd553b"
}
],
Option#2: Identify Intent on 3rd Party Side and Pass it to LP (Connector API)
Solution Engineers can map intent from the third-party system and transmit it to LivePerson through Connectors API.
This involves identifying the user's intent on the third-party side, structuring the intent information within the payload, and passing it to LivePerson through the Connectors API for further processing and handling within the LivePerson platform.
Considerations:
- You need to map the user's intent from the brands bot side. This likely involves identifying the user's intention based on their input or interaction with the bot.
- Implement a payload structure to convey the identified intent information to LivePerson through the Connectors API.
Connector API Payload Sample:
The provided payload sample demonstrates how the intent
information is structured within the payload sent to LivePerson through the Connectors API. It includes:
- User Profile Data: Information about the user, such as their name
firstname
lastname
, gender
, socialId
, etc. - Metadata: Includes information related to the conversation, such as the detected
intents
, externalConversationId
, businessCases
, etc.
javascript:
[{
"kind": "req",
"id": "1,",
"type": "userprofile.SetUserProfile",
"body": {
"authenticatedData": {
"lp_sdes": [
{
"type": "ctmrinfo",
"info": {
"socialId": "1234567890",
"ctype": "vip",
"customerId": "{{consumerId}}"
}
},
{
"type": "personal",
"personal": {
"firstname": "John",
"lastname": "Doe",
"gender": "MALE"
}
}
]
},
"type": "ms.PublishEvent",
"metadata": [
{
"type": "BotResponse",
"intents": [ //The intent information is provided in this section of the payload
{
"id": "some intent identifier",
"confidence": "MEDIUM",
"confidenceScore": 0.753
}
],
"externalConversationId": "conversation identifier",
"businessCases": [
"business case name"
]
},
{
"type": "ActionReason",
"reason": "some reason",
"reasonId": "some reason Id"
}
]
}
},
{
"kind": "req",
"id": "2,",
"type": "cm.ConsumerRequestConversation",
"body": {
"ttrDefName":"NORMAL",
"channelType":"MESSAGING",
"brandId": "58079674",
"skillId": "2022899430",
"conversationContext": {
"type": "SharkContext",
"lang": "en-US"
}
}
}
]
Messaging Interaction API Side (Reporting):
This section provides a sample message record from the Messaging Interaction API side, which includes:
- Message Data: The actual text message exchanged between the user and the bot.
- Context Data: Includes raw and structured metadata related to the conversation
contextData
, such as detected intents
, externalConversationId
, and ActionReason
.
javascript:
"messageRecords": [
{
"type": "TEXT_PLAIN",
"messageData": {
"msg": {
"text": "************* - Ashleigh - she says she wants to leave out subtitles but doesnt know what intents are missing. Per Ilaria\n************* - Vlad - sure will send update\n************* - Ashleigh - Thanks! We can also mention it at the end of our UK call here in a few minutes if you already have the info\n************* - Ashleigh - I dont see a DRD for WA or AMB in terms of knowing what automatic messages they want - let me know how I can help on that\n************* - Vlad - i did not collect this requirements , during scope phase, i will send them doc with existing messages to they can put ow\n************* - Ashleigh - Thanks!"
}
},
"messageId": "ms::dialog:d708abfc-66aa-4c8e-8b88-83a5762d5013::msg:0",
"audience": "ALL",
"seq": 0,
"dialogId": "d708abfc-66aa-4c8e-8b88-83a5762d5013",
"participantId": "ec06244807f8e4b50b7ef21c763727f2465264fef64f09dbdd01d96b5a951224",
"source": "SHARK",
"time": "2024-01-30 09:56:03.398+0000",
"timeL": 1706608563398,
"integrationSource": "SHARK",
"sentBy": "Consumer",
"contextData": { // This section provides the intent data received from the 3rd party
"rawMetadata": "[{\"type\":\"BotResponse\",\"intents\":[{\"id\":\"some intent identifier\",\"confidence\":\"MEDIUM\",\"confidenceScore\":0.753}],\"externalConversationId\":\"conversation identifier\",\"businessCases\":[\"business case name\"]},{\"type\":\"ActionReason\",\"reason\":\"some reason\",\"reasonId\":\"some reason Id\"}]",
"structuredMetadata": [
{
"botResponse": {
"externalConversationId": "conversation identifier",
"businessCases": [
"business case name"
],
"intents": [
{
"id": "some intent identifier",
"confidence": "MEDIUM",
"confidenceScore": 0.753
}
]
}
},
{
"actionReason": {
"reason": "some reason"
}
}
]
}
},
Option #3: Leverage LivePerson's Intent Manager
This is done utilizing LivePerson's native feature, Intent Manager, to automatically detect and enrich intents within the Messaging Interaction API.
Considerations:
- The conversation needs to occur within the LivePerson platform, either initiated directly through LivePerson's web messaging or in-app messaging, or escalated from an external system via the Connector API.
- Reviewing and updating the Natural Language Understanding (NLU) domain may be necessary to ensure accurate intent detection and enrichment by the Intent Manager.
- The Messaging Interaction API payload is relied upon to access the detected intent information.
If Intent Manager is enabled, it automatically detects intents within conversations and enriches the Messaging Interaction API with this information (such as firstIntentName
and firstIntentLabel
). This means that LivePerson's system is capable of recognising the user's intention within the conversation without explicit manual identification.
javascript:
"info": {
"startTime": "2024-02-16 14:26:59.903+0000",
"startTimeL": 1708093619903,
"endTime": "undefined",
"endTimeL": -1,
"duration": 509644127,
"conversationId": "2579580e-bd4f-4688-aa5c-93a929f186fb",
"brandId": "11478817",
"latestAgentId": "3485403230",
"latestAgentNickname": "Navy Federal",
"latestAgentFullName": "coremobileroutingbot2",
"latestAgentLoginName": "coremobileroutingbot2",
"agentDeleted": false,
"latestSkillId": 4289249938,
"latestSkillName": "Collections - Recoveries Mobile",
"source": "Shark-C4M",
"mcs": 0,
"alertedMCS": 0,
"status": "OPEN",
"fullDialogStatus": "OPEN",
"firstConversation": false,
"latestAgentGroupId": -1,
"latestAgentGroupName": "Main Group",
"latestQueueState": "IN_QUEUE",
"isPartial": false,
"features": [
"QUICK_REPLIES",
"AUTO_MESSAGES",
"MULTI_DIALOG",
"RICH_CONTENT"
],
"ipAddress": "172.26.138.213",
"latestHandlerAccountId": "11478817",
"latestHandlerSkillId": 3483502630,
"firstIntentName": "840afa99-4847-4ea6-9fd3-4e88f889288a", // Sample data enriched by Intent Manager
"firstIntentLabel": "check balance"
},
Option #4: Utilize Intent Manager and Intent API
Solution Engineers can call Intent Manager to fetch intent using LivePerson's Intent API. This involves utilizing LivePerson's native feature, Intent Manager, in conjunction with the Intent API to determine and extract intents from user dialogues.
Considerations:
- The brand uses the Intent Manager NLU External APIs provided by LivePerson to retrieve intent information.
- The brand decides which dialogue qualifies as the first intent, likely indicating the initial user input or query in a conversation.
- Review and update the Natural Language Understanding (NLU) domain to ensure accurate intent detection.
- The intent information is obtained by relying on the response from the Intent API.
The response from the Intent API includes details about the detected intent for a given input sentence. It provides information such as the input sentence, detected intent name and ID, confidence score, status, and other relevant metadata.
javascript:
// Sample response from Intent API
{
"success": true,
"successResult": {
"match_results": [
{
"inputSentence": "i would like to reset my password can you help?",
"intentName": "reset password",
"intentId": "05e75378-dc17-4926-b121-3a267630ea73",
"displayName": "reset password",
"chatBotPlatformUserId": null,
"chatBotId": null,
"status": "VERY_GOOD",
"word2vecNLUResult": null,
"wordnetNLUResult": null,
"inputSentenceNLP": null,
"minDistance": 0.05625540018081665,
"score": null,
"knowledgeDataSourceId": null,
"knowledgeArticleId": null,
"language": null,
"originalSentence": "i would like to reset my password can you help?",
"entityProcessedSentence": null,
"keyPhrasesMatched": null,
"metaIntent": null,
"metaIntentId": null,
"slotValues": null,
"entityValues": null,
"domainId": null,
"domainName": null,
"domainType": null,
"modelVersionId": null,
"modelVersion": null,
"domainModelVersion": null,
"source": null,
"nerResponse": null,
"combinedAverageMinDistance": 0.05625540018081665,
"adjustedMinDistance": 1.0,
"keyPhraseMatch": false,
"domainTypeName": "Liveperson",
"primaryDomain": null
},
…
]
},
“Message”: “Success”
}
Option #5: Identify with LP Gen AI
Utilize LivePerson's Generative AI capabilities to build a custom prompt within Conversation Builder that can understand the user's intent through LLM/OpenAI.
Gen AI uses advanced natural language processing techniques to understand and interpret user messages. LivePerson's Conversation Builder is utilized to create a custom prompt. This prompt helps guide Gen AI in understanding user intents more effectively. It likely provides context or instructions tailored to the specific use case.
Consideration:
- The bot has the capability to store data into LivePerson's Structured Data Entity (SDE). This facilitates the collection, storage, and analysis of bot-related data, including insights into bot performance and user interactions.
Additional Reporting Features - Custom event log from bot + API for reporting
- Actions or selections made by users, or the original intents detected by the bot, can be tracked and recorded within LivePerson's Analytics Studio. This mapping allows for the visualization and analysis of user interactions and intents within the analytics platform, providing insights into user behavior, preferences, and trends.
- Some limitations include the lack of specificity in detecting intents and the inability to capture conversations that occur outside of LivePerson's platform or transfer to a live agent. Conversations that transfer to agents or occur outside LivePerson may not be captured accurately or at all for analysis.