Enable Live Chat with Salesforce

Once you've completed the basic Salesforce API integration, you may enable live chat between your Salesforce agents and your users in the Decagon Chat interface by leveraging the Salesforce LiveAgent API. Here's how you do it.

Step 1: Create a Chat Deployment in Salesforce

  1. In the Quick Find search field, search for deploy. Under the heading Chat or Live Agent, select Deployments. Click New to create a new chat deployment.

  2. Complete the following fields:

    Field

    Notes

    Chat Deployment Name

    Input a name such as "Decagon AI"

    Developer Name

    Keep the default

    Chat Window Title

    Can be anything

    Idle Connection Warning Duration

    Indicates the additional duration, in seconds, that the customer can remain unavailable or disconnected before a warning is sent to the agent. The default value is 40 seconds. Select the checkbox to enable custom timeouts.

    Idle Connection Timeout Duration

    Indicates the additional duration, in seconds, that the customer can remain unavailable or disconnected before the chat ends. The default value is 110 seconds. Select the checkbox to enable custom timeouts.

  3. Click Save to create your new chat deployment and obtain the deployment code, which contains information to pass on to Decagon.

  4. There are 3 values that are relevant here and they are contained within the brackets following liveagent.init.

    Example: liveagent.init('https://d.la3-c2cs-iad.salesforceliveagent.com/chat', '5720v00000001BQ', '00D0v0000007949');

  5. The URL address provided in the brackets (e.g., https://d.la3-c2cs-iad.salesforceliveagent.com/chat in the example above) is your 'Salesforce Host URL'. Record this in a Google Doc or Word doc as you will need to send it to Decagon later.

  6. Copy the string of numbers and letters that comes after the URL address (e.g., 5720v00000001BQ in the example above), and record that as the 'Deployment ID'.

  7. Copy the final string of numbers and letters that completes the content within the brackets (e.g., 00D0v0000007949 in the example above), and record that as the 'Organization ID'.

Step 2: Create a chat button ID in Salesforce

Note that for best results, use Omni-Channel routing (it's likely you are already).

  1. In the Quick Find search field at the top of the left hand menu, search for chat button and select Chat Buttons & Invitations under the heading Chat or Live Agent.

  2. Click where it says New to create a new chat button.

  3. Complete the Basic Information and Routing Information sections. Use the Salesforce Chat Button Settings guide for help with each of the fields.

  4. Click Save to create your new chat button and provide you with the chat button code.

  5. Within the code you will see the same button ID listed a number of times, locate one and record it as 'Button ID' along with the values from Step 1.

Step 3: Send the values to Decagon

After you've compiled the highlighted values, go ahead and send them to the Decagon team. We'll take it from there!

In summary:

  • 'Salesforce Host URL'

  • 'Deployment ID'

  • 'Organization ID'

  • 'Button ID'

Last updated