Skip to main content

Live Chat Integration on app.yellow.ai

This integration will allow the customers who are using bots on app.yellow.ai to use the updated live chat integration on cloud.yellow.ai.

1. Use cases

The following are the use-cases of this integration:

1.1 Amazon connect live agent

To connect with an Amazon Connect Live Agent, use this code-snippet


app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
amazonConnectLiveAgentCustomFields: {customFields: {test: “yes”}}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
amazonConnectLiveAgentCustomFields{customFields: {test: “yes”}}ObjectCustom key: value pairs associated with the end user required to raise a ticket. You need to pass the value of this key as {}, in case no key: pairs are required.

Sample response in case of success

{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the amazon connect create ticket API

Sample response in case of failure


{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}

:::note apiresponse represents the raw response from the amazon connect create ticket API :::

1.2 Avaya Live Agent

To connect with an Avaya Live Agent, use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields in the that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.

Sample response in case of success

{
"assignedTo": true,
"success": true,
"message": "Agent is available and ticket is assigned to the agent",
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}

note

apiresponse represents the raw response from the avaya create ticket API

Sample response in case of failure


{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "Agent availability is false and hence not assigned to any agent.",
"ticketInfo": "{{apiresponse}}"
}

note

apiresponse represents the raw response from the avaya create ticket API

1.3 Custom Live Agent

To connect with a Custom Live Agent, use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
category: "Sales",
priority: "MEDIUM",
customLiveAgentCustomFields: {customFields: {test: “yes”}}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields in the that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
categorySalesStringCategory under which the ticket will be created.
priorityMEDIUMStringPriority of the ticket to be created.
customLiveAgentCustomFields{customFields: {test: “yes”}}ObjectCustom key:value pairs associated with the end user required to raise a ticket. You need to pass the value of this key as {}, in case no key:pairs are required.

Sample response in case of success


{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the custom live agent create ticket API

Sample response in case of failure


{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "Agent is unavailable to chat with the end user, hence transferring the control back to the bot.",
"ticketInfo": "{{apiresponse}}"
}
apiresponse represents the raw response from the custom live agent create ticket API

1.4 Freshchat Live Agent

To connect to a Freshchat Live Agent, please use this code-snippet

    app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
assignedGroupId: "test-group",
freshChatUserId: "3554-cbcbc-dchchc",
freshChatUniqueIdentifier: "testInfo"
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields in the that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
assignedGroupIdSalesStringCategory under which the ticket will be created.
priority3554-cbcbc-dchchcStringFreshchat groupId to which the ticket needs to be assigned. The default value that needs to be passed for this is “”.
freshChatUserIdtest-groupStringFreshchat userId of the user. This is passed if the same ticket needs to be re-opened for the same user.The default value that needs to be passed for this is “”.
freshChatUniqueIdentifiertestInfoObjectA unique identifier that if passed will reflect as referenceId in the freshchat agent portal. The default value that needs to be passed for this is “”.

Sample response in case of success

{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}

note

apiresponse represents the raw response from the freshchat live agent create ticket API

Sample response in case of failure:-

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "Agent is unavailable to chat with the end user, hence transferring the control back to the bot.",
"ticketInfo": "{{apiresponse}}"
}

::: note apiresponse represents the raw response from the freshchat live agent create ticket API :::

1.5 Kapture CRM Live Agent

To connect to a Kapture CRM Live Agent, please use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.

Sample response in case of success


{
"assignedTo": true,
"success": true,
"message": "Agent is available and ticket is assigned to the agent",
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}

note

apiresponse represents the raw response from the kapture crm create ticket API

Sample response in case of failure

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "Agent availability is false and hence not assigned to any agent.",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the kapture crm create ticket API

1.6 Locobuzz Live Agent

To connect to a Locobuzz Live Agent, please use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
category: "Sales",
priority: "MEDIUM",
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
categorySalesStringCategory under which the ticket will be created.
priorityMEDIUMStringPriority of the ticket to be created.
sentimentHappyStringUser sentiment. Default value to be passed for this key is “”.

Sample response in case of success

{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the locobuzz live agent create ticket API

Sample response in case of failure

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "Agent is unavailable to chat with the end user, hence transferring the control back to the bot.",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the locobuzz live agent create ticket API

1.7 Genesys Live Agent

To connect to a Genesys Live Agent, please use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
genesysCustomFields: {customFields: {test: “yes”}}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
genesysCustomFields{customFields: {test: “yes”}}ObjectCustom key:value pairs associated to the end user required to raise a ticket. You need to pass the value of this key as {}, in case no key:pairs are required.

Sample response in case of success

{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the genesys create ticket API

Sample response in case of failure

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from genesys create ticket API

1.8 Genesys Cloud Live Agent

To connect to a Genesys Cloud Live Agent, please use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
genesysCloudCustomFields: {customFields: {test: “yes”}}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
genesysCloudCustomFields{customFields: {test: “yes”}}ObjectCustom key:value pairs associated to the end user required to raise a ticket. You need to pass the value of this key as {}, in case no key:pairs are required.

Sample response in case of success


{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the genesys cloud create ticket API

Sample response in case of failure


{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from genesys cloud create ticket API

1.9 Intercom Live Agent

To connect to an Intercom Live Agent, please use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
intercomLiveAgentCustomFields: {customFields: {test: “yes”}}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
intercomLiveAgentCustomFields{customFields: {test: “yes”}}ObjectCustom key:value pairs associated to the end user required to raise a ticket. You need to pass the value of this key as {}, in case no key:pairs are required.

Sample response in case of success


{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the intercom create ticket API

Sample response in case of failure

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the intercom create ticket API

1.10 Nice Incontact Live Agent

To connect to a Nice Incontact Live Agent, please use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.

Sample response in case of success

{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the nice-incontact create ticket API

Sample response in case of failure

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}
apiresponse represents the raw response from the nice-incontact create ticket API

1.11 Talishma Live Agent

      To connect to a Talishma Live Agent, please use this code-snippet

app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
}
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});

This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.

Sample response in case of success

{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the talishma create ticket API

Sample response in case of failure

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the talishma create ticket API

1.12 Salesforce Live Agent

To connect with an Salesforce Live Agent, use this code-snippet

      app.raiseTicketForThirdPartyLiveChat({
issue: "Test Issue",
contact: {
phone: "9876543210",
name: "Raj",
email: "[email protected]"
},
salesforceLiveChatCustomFields: [],
salesforceLiveChatCustomEntities: [],
salesforceLiveChatAgentId: ""
}).then((ticketData) => {
app.log(ticketData, "ticketData");
// Display appropriate message based on the ticketData
}).catch((error) => {
app.log(error, 'error');
//Error handler
});


This table consists of sample values, data types and descriptions for all the fields that need to be filled.

Field nameSample valueData typeDescription
issueTest descriptionStringThe subject/topic/reason why the ticket is created.
phone9876543210StringMobile number of the end user.
email[email protected]StringEmail address of the end user.
nameRajeshStringName of the end user.
salesforceLiveChatCustomFields[
{
"label": "Mobile",
"value": "9999444443",
"entityMaps": [
{
"entityName": "contact",
"fieldName": "Mobile_Number__c"
}
],
"transcriptFields": [
"Mobile_Number__c"
],
"displayToAgent": true
},
{
"label": "Chat",
"value": "sessionURL",
"entityMaps": [
{
"entityName": "case",
"fieldName": "chat_transcript__c"
}
],
"transcriptFields": [
"chat_transcript__c"
],
"displayToAgent": true
}
]
ArrayThe list of details provided by the user before initiating the chat with the live agent
salesforceLiveChatCustomEntities[
{
"entityName":"Contact",
"saveToTranscript":"contact",
"linkToEntityName":"Case",
"linkToEntityField":"ContactId",
"entityFieldsMaps":
[
{
"fieldName":"LastName",
"label":"LastName",
"doFind":true,
"isExactMatch":true,
"doCreate":true
},
{
"fieldName":"FirstName",
"label":"FirstName"
"doFind":true,
"isExactMatch":true,
"doCreate":true
},
{
"fieldName":"Email",
"label":"Email",
"doFind":true,
"isExactMatch":true,
"doCreate":true
}
]
}
]
ArrayThe records that are created/ searched depending on what EntityFieldsMaps have been enabled.
salesforceLiveChatAgentId0055g00000HEbLDStringThe agentId that needs to be passed if you want to use the sticky agent feature.

Sample response in case of success:

{
"assignedTo": true,
"success": true,
"status": "ASSIGNED",
"ticketInfo": "{{apiresponse}}"
}
note

apiresponse represents the raw response from the salesforce create ticket API

Sample response in case of failure:

{
"success": false,
"assignedTo": false,
"agentNotAvailable": true,
"message": "TicketId is not created and transferring the control back to the bot",
"ticketInfo": "{{apiresponse}}"
}

note

apiresponse represents the raw response from the salesforce create ticket API

2. Configuration

You can configure any of the above mentioned live agent integration(s) by following these steps:-

To enable the integration in the yellow.ai Integrations Module,

  1. Login to app.yellow.ai, search for your bot in the Search Projects section and then click the bot.
drawing
  1. Click the Growth icon on the left navigation bar.
drawing
  1. Click Data Explorer. You will be redirected to the cloud.yellow.ai’s UI.
drawing
  1. On the top left corner, click the drop-down and choose Integrations.
drawing
  1. Configure the required live chat integration
drawing
  1. .After entering the required values, click Connect and the integration will get enabled on yellow.ai.