Salesforce Integration - Tab Integration

What it's about

Salesforce Integration is used to automatically open a task for every call according to the conditions (Queue, Call status or Outbound) set in the trigger: the Salesforce Task or Case that will be created automatically will be populated with information about the call (managed on XCALLY) and displayed to the agent in the Salesforce environment.

Moreover, with the Integration Tab Integration, it is possible to use the ClicktoCall / LogCall Integration. For instance, from a Salesforce customer tab you can just click on the telephone number and start a conversation with the contact (using the Phonebar): in this case, a new Task object will be created and opened in a dedicated tab, containing all updated information regarding the phone call.

Requirements

Salesforce Configuration

Create a New Connected App

  • Login to Salesforce with an Administrator account.
    When you register your Salesforce account, you will receive an email to verify it and you can see also your Salesforce URL (which you will insert also in XCALLY configuration, in URL field)

    image-20240122-102245.png
  • Switch to Lightning Experience.

  • From the Homepage, access the Setup section

image-20240117-085038.jpg

 

  • From Apps → App Manager, create a New Connected App

  • Enter the following data into the New Connected App:

 

  • Connected App Name: choose a name (i.e. NW_xcally)

  • API Name: choose a name (i.e. NW_xcally)

  • Contact Email: your company mail address

 

  • Enable OAuth Settings: Enabled

  • Insert the Callback URL:  https://login.salesforce.com/services/oauth2/callback

  • Select and add the following OAuth Scopes:

    • Access Connect REST API resources (chatter_api)

    • Manage user data via APIs (api)

    • Access custom permissions (custom_permissions)

    • Access the identity URL service (id, profile, email, address, phone)

    • Access unique user identifiers (openid)

    • Full access (full)

    • Perform requests at any time (refresh_token, offline_access)

    • Access Visualforce applications (visualforce)

    • Manage user data via Web browsers (web)

  • Click on SAVE

 

Here you can find all the information about the Connected App creation: https://help.salesforce.com/apex/HTViewHelpDoc?id=connected_app_create.htm

 

 

Retrieve the Client ID and Secret

  • Login to Salesforce with an Administrator account

  • From Apps → App Manager → enter the app

  • In the API section, click on Manage Consumer Details

  • Verify your identity (email with verification code could be sent in the spam folder)

  • Copy the Consumer Key (Client ID) and Secret (Client Secret)

Retrieve the Token

  • When you set the Salesforce user password, you will receive an email with the Security Token. Save it!

If you don’t remember the token or want to reset it:

  • Login to Salesforce with an Administrator account

  • From the Homepage, access the Settings section

  • From My Personal Information → Reset My Security Token, click on Reset Security Token

 

  • You will receive an email with the actual security token. Save it!

Please note that any time you change the Salesforce user password, the Token becomes invalid and must be reset: remember to insert the new one on the XCALLY Salesforce Account to make integration work!

OAuth and OpenID Connect Settings

Finally you need to allow OAuth Username-Password Flows to avoid authentication failure

From Identity OAuth and OpenID Connect Settings → switch on Allow OAuth Username-Password Flows

(Remember to keep disable PKCE extension to avoid application working issue)

Create a Call Center Adapter

  • Login to Salesforce with an Administrator account

  • From the Homepage, access the Setup section

  • From Feature Settings → Service, enter the Call Center section and click Continue

 

  • Click on Import and upload call_center.xml  (Remember to insert the real IP address of your XCALLY Motion Server)

You will see the imported Call Center, called Motion Call Center Dialpad

 

  • Edit the Call Center Adapter:

 

 

General Information

The Display Name property value must start with word Motion

Motion Parameters

  • Host: set your XCALLY Motion https IP address

Manage Task

  • Create a task during the phone call (true or false): create a Task object during a click-to-call action

  • Create the task on the customer’s answer (true or false): create the task, but only in case the customer has answered the phone call

  • Update the task fields on hangup (true or false): update the information registered inside the Task object after the hangup event (end of phone)

  • Refresh the task page on hangup (true or false): immediately refresh the task tab after the hangup event

  • Default status of the created task (Not Started, In Progress etc…): set the default status of the Task object after the object is created

  • Default status of updated task (In Progress, Completed…): set the default status of the Task object after the object is updated

 

According to the configuration fields you managed in the Call Center section, three events can be fired on ClickToCall:

  • no Task object is created (Create a task during the phone = false)

  • a new Task object is created when you clicked on the contact phone number (Create a task during the phonecall = true & Create the task on customer answer = false)

  • a new Task object is created when the customer answered the phonecall (Create a task during the phonecall = true & Create the task on customer answer = true).

 

When hanging up (performed by you or by the contact), three possible events can be triggered:

  • no events at all and the Task object will not be updated with new information regarding the phonecall (Update the task fields on hangup = false)

  • the Task object will be updated with the new information. You can see the updated information once you will enter again the tab or refresh it (Update the task fields on hangup = true & Refresh the task page on hangup = false)

  • the Task object will be updated and the Task object tab will be refreshed, so that the updated information will be immediately visible (Update the task fields on hangup = true & Refresh the task page on hangup = true).

 

 

Field Mapping section

  • You'll find eleven fields available, each related to an Asterisk* environment variable, that you can use to fill your own custom fields created for the Activity / Task object (these fields are not mandatory for the ClickToCall LogCall function to work properly)

 

In order to visualize the Asterisk* variable content inside a custom field:

  • Create a custom field of type String (255) 

  • copy the Field Name (ID_Name on Salesforce Classic Version) inside the input field of the related Asterisk* variable and Save

Now the Activity Task Tab created by LogCall will show the Asterisk* variable content inside your own custom field.

 

  • Call Center Users: Enable Users to use the integration by clicking on the Manage Call Center Users button and then Find and  Add new Users to the Call Center:

Create lightning experience app

  • Go to App App Manager and click on New lightning App

 

  • Fill the required setting as shown below and click Next

 

  • In “App Options” Select Console navigation and click Next

 

  • Click on Add and select openCTI softphone. 

 

  • Customize the layout of the softphone as you desire and then click Next

 

  • Add items to use in the app: Select Leads, Contacts and Tasks

 

  • Select user profiles to give them permission to use and see the app. Choose the profiles your agents belong to and click Finish

 

  • Click on App launcher button at the top left of the screen and you will see the new Motion App

Install the Motion Dialpad Chrome extension 

You need to install XCALLY Motion Dialpad Chrome extension to use Phone functionality in Salesforce Console App.

The Chrome Extension is available https://chrome.google.com/webstore/detail/xcally-motion-dialpad/jpkfmllgncphdgojhkbcjidgeabaible?utm_source=chrome-ntp-icon  in the Chrome Web Store.

 

Dialpad needs the Phonebar with remote control enabled on port 9888.


Make Motion Dialpad to not create the Recording URL and leave the task to Triggers only

You must disable Salesforce Task creation from dialpad integration, here are the steps to follow:

  1. Click on the setup icon

  1. Search the Call Center setting and change the Motion Dialpad configuration

  1. Change the settings under the "Manage Task" section. From true you must pass them to false.

After doing this they can re-enable the triggers so as not to create the task 2 times for the same call.

XCALLY Configuration

Create a Salesforce Account


To create a new Salesforce Account go to the Integrations section → Salesforce Accounts and click on 

 

 

Enter the following details and click on Add Salesforce Account:

  • Name: enter a name for the integration

  • Type: chose Integration Tab (OpenCTI Integration): the task will be displayed in a new tab inside Salesforce interface.

  • Username: this value must be the same as the Salesforce Administrator Account Username

  • Password: same as a Salesforce Administrator Account Password

  • URL: your Salesforce URL i.e. https://my-company.my.salesforce.com

  • Client ID:  Salesforce Consumer Key

  • Client Secret: Salesforce Consumer Secret

  • Client Token: Salesforce Security Token

  • Motion or Proxy IP Address: written as <protocol>://<ipaddress>[:<port>] form. It is required to use the Recording URL in the Task Configuration.  Example: https://X.Y.Z.W  

  • Description (optional)     

 

Click on Add Salesforce Account

After the Account is created, you can view it in the list of accounts, edit the account parameters and remove the account. 

You can verify if the account credentials are correct by clicking on Test Salesforce Account.

Edit the Salesforce Account

Find the account from the accounts list and Click on Edit Salesforce Account:

You will see two tabs: Account and Configurations:

In the Account tab, you can modify the account parameters and in the Configurations tab, you can create, update or delete Salesforce configurations. 

A Salesforce configuration is used to design the content of the Salesforce task (Subject, Description and Fields) that is created and displayed for the Agent managing calls.

You can create multiple configurations for a single Salesforce Account and use them in different triggers. In this way, for example, you will be able to use different task layouts for outbound and inbound calls.

To create a new configuration, Edit the Salesforce account, go under the configurations tab and click on 



Choose a Name, Channel (Voice).

Choose a Type:

  • Inbound in Queue 

  • Outbound Call 

Choose a Ticket Type:

  • Case: record used for tracking customer issues and support requests and it contains contact information, description of the issue, status, priority. Salesforce provides functionality for managing cases, assigning them to specific agents or teams, tracking their progress, and resolving them to ensure customer satisfaction

  • Task: used for managing specific actions or activities related to cases or other Salesforce records that needs to be completed. Tasks can be associated with leads, contacts, accounts, cases… and for example a task can include making a phone call, sending an email or scheduling a meeting.         

Then, click on Add Salesforce Configuration.

This value is used during the startup of the configuration and is used by the system to generate the template: the configuration will be created with default Subject and Description settings that you can simply use without any modification.

You can also edit the configuration and customize the SubjectDescription and Fields of the Salesforce Task according to your needs.

 

 

Subjects

By default, you will find the following three fields already configured

  • the String [XCALLY Ticket]

  • the Queue Variable

  • the Caller number Variable

You can add more than one field in the Subject and all fields will be joined by the blank space.

Use button to add a new fields. New fields are added at the end of the field list.

You can insert 3 different type of fields:

  1. String: static string e.g. a label as [xCALLY Ticket]

  2. Variable: Motion System Variable, e.g. queue or calleridnum (see V3 Motion Variable List)

  3. Custom Variable: any dynamic variable created under Tools > V3 Variables





Descriptions

 

You can add more than one field in the Description. All fields will be joined by new line.

Use button to add a new Description (it will be added at the bottom of the list).

You can insert two different type of fields:

  1. String: static string e.g. *** Call Info ***

  2. Key Value: name-value item in the form name: value

where the first field is a static string (e.g. Caller Number) and the second field could be filled with the following:

  • String: static string

  • Variable: System Variable like Caller Number (see V3 Motion Variable List)

  • Custom Variable: dynamic variable created under  Tools > Variables

The colon character in the Key Value type is automatically added by the system

Fields

In the drop-down list you can find the complete list of fields available in your Salesforce account: Standard and Custom fields.

Use button to add a new field, choose the Standard or Custom field by scrolling the list of the values.

Define the Type:

  • String: static string (you must insert it)

  • Variable: a System Variable (choose it from the list: e.g. Queue, uniqueid, calleridnum, etc.)

  • Custom Variable: one of the dynamic variables (created under Tools > Variables)

  • Picklist: choose among the list of the integrated Application Fields. You can only select one of the predefined values available for that field (if any).

 

Repeat the steps above to add more fields.

 

Advanced

In this section you can set:

  • how to Search the Module as: Account, Lead, Contact, Contact&Lead, Contact&Lead&Account

  • how and if (nothing=no creation) to Create the Module as: Contact, Lead or Account

  • Lead Id, where to insert the Lead name (this field will be shown only if the Module Search field is or contains Lead)

  • Additional field where to search the customer phone number in the:

    • Account, if the Module Search value chosen is (or contains) Account

    • Contact, if the Module Search value chosen is (or contains) Contact 

    • Lead, if the Module Search value chosen is (or contains) Lead

This is a field, in addition to Phone, to search for customers in Lead, Contact and Account: you can insert here the mobile or fax number field name you have on Salesforce

 

You can find Lead Field Name on Salesforce under Object Manager Menu → Lead → Fields & Relationship:

Configure the Trigger

It is mandatory to create a Trigger to make the Salesforce integration work.

Go to Tools → Triggers Section and click on .

Enter the trigger Name, select Voice Channel and click on Add Trigger. 

 

 

Add Trigger Conditions

You can use properties like Queue, Call status or outbound to define the conditions you want to trigger the Salesforce integration.

Example: the integration will be active for Calls in Sales Queue and when the call is answered. 

For more information on trigger conditions, take a look at Voice Trigger Conditions.

Add Trigger Action

To execute the Salesforce integration when the conditions are met, click on Add Action and select Integrations and Salesforce.

You can then select one of the the Salesforce account you have created and the configuration you want to use.

Salesforce Integration Interaction

 

Related pages