Salesforce AWS Integration with Amazon Connect

decor
decor

Salesforce AWS Integration

1. Salesforce AWS Integration Abstract

In its nearly about 20 years of existence, Salesforce has gone through a lot of modifications but it has not veered off from its mission of being the leader in CRM (Customer Relationship Management) market, the definition of CRM has changed drastically over the two decades, from being a management automation tool to expanding its wings in customer service and marketing automation, then moved into B2B, B2C and B2B2C e-commerce.

On the other hand, Amazon web service (AWS) is the market leader of IaaS (Infrastructure-as-a-service) and PaaS (Platform-as-a-Service), AWS provides a broad set of cloud-based services including compute, storage, analytics, databases, IOT and many more.  These services can be combined to create scalable and practical cloud-based applications. Today, we will integrate Salesforce with AWS using one of its services called Amazon Connect.

decor
decor

2. Salesforce Amazon Integration

Amazon connect can be described as an omnichannel cloud contact center, with the help of Salesforce AWS Integration you can create personalized experiences for your customers using the omnichannel communication, Salesforce AWS Integration lets you create dynamic chat and voice support based on customer preferences and estimated wait time, Amazon connect is basically an adapter which provides browser-based contact control panel (CCP) functionalities within the Salesforce environment, the Amazon connect CTI integration consist of two components:

  1. A managed Salesforce package.
  2. An AWS Serverless application deployed to your AWS environment.
decor
decor

 

  • Characteristics of Amazon Connect CTI diagram shows key characteristics of Amazon Connect CTI :
decor
decor

The managed package is the base of CTI integration between Salesforce and Amazon Connect, while the server less application along with the core CTI integration provides access to additional functionalities and tools that provide access and analyses of data from both platforms, these components can be used to build a deep integration between Amazon Connect and Salesforce, the server less application also contains Lambda functions which can be used by Amazon Connect to interact with Salesforce.

2.1 Salesforce Amazon Connect CTI Benefits

The Key benefits of Amazon Connect CTI are as follows:

  1.  Amazon connect CTI voice and chat support: It enables user to make voice and chat calls from within the Salesforce environment, the user can directly call a contact from the contact record screen, it helps in removing manual steps for that a user needs to take while connecting with a customer.
  2.  Single Sign-On support: Single Sign-on allows user to log in with a single ID and password to of several related, yet independent web portals ,the Salesforce AWS Integration provides seamless login with connect and Salesforce with any standard SAML 2.0 provider.
  3.  IVR data dips: Ability to inject Salesforce data into customer experience, this helps businesses to offer personalized greetings and dynamic routing based on customers personalized interest and information, the data dips can help to route calls based on the users preferences.
  4.  Call logging and recording: Call interactions are logged as Salesforce activities and the recordings from the Amazon connect environment can be played in Salesforce environment locally, with the help of this feature the user can manage all the data at a single source.
  5.  Contact historical reports: Ability to display historical contact reports from Amazon connect within Salesforce, this can help in tracking the previous communications with customers.
  6.  Contact centre real-time reports:
    Ability to display real-time contact reports from Amazon connect within Salesforce, this particular service can help Real time monitoring of calls and can used to quickly and easily identify customer at risk.
  7.  Lightning CCP extensions: This helps in easy customizations and extend behaviours within the CTI Adapter such and screen pop and activity management.

2.2 Salesforce AWS Integration Steps

Now, let’s dive into the integration steps:

  1.  Create an AWS account, you can use this link to open the AWS signup page, you can also use your existing account if you already have one, while setting up the AWS account please follow the below mentioned steps :
  • Select the region where you intend to use the application.
  • Follow the below mentioned steps to create an Instance –

1. Provide the access URL name.
2. Provide the access URL name.
3. Add admin user (Optional).
4. Check both the Incoming calls and outbound calls checkboxes.
5. Review the provided details and create the instance (The process can take a few minutes, once complete, claim the contact number, the contact number can be customized) see the attached image 2.2 Manage Phone Numbers.

decor
decor
  • 2.2 Manage Phone Numbers
decor
decor

02. Enable Mydomain in your Salesforce org (Please ignore is already active).

03. Install the Amazon connect CTI from Salesforce AppExchange, you can use this link to open the Amazon connect CTI AppExchange screen.

04. Once the installation of Amazon connect CTI is complete, go to Setup and enter “Call center” in the quick find box, select the Call Centers option (If the package we installed earlier is installed successfully, you will be able to see ‘Amazon connect CCP adapter’ option’s here).

05. As we are targeting Salesforce classic environment in this tutorial, let’s edit the Amazon Connect CCP Adapter Classic option, so that we can make use of it for making soft calls –

  • Change the CTI Adapter URL to ‘amazonconnect__ACSFCCP_Classic’.
  • Change the Salesforce Compatibility Mode to ‘Classic’.
  • Change the Amazon Connect CCP URL to –
    https://example.awsapps.com/connect/ccp (here replace ‘ example ‘ with your Amazon connect instance name).
  • Now, let’s add Country code, name and phone number details to the Phone number formatting field, ex- {“OPF”:”0″,”NPF”:”1″,”Country”:”US”,”NF”:”International_plaintext”,”TNF”:”(555) 123-4567″}
  • Lastly, lets add a call center user by using the ‘Manage Call Center Users’ option (Add at least one user) . See the Figure 2.3 Call Center Amazon Connect CCP Adapter setting
decor
decor
  • Figure 2.3: Call Center Amazon Connect CCP Adapter setting
decor
decor

06. Now, let’s search for Visualforce Pages using the quick find box-

decor
decor
  • Figure 2.4 : List of VF pages after installation
decor
decor
  • Open ‘amazonconnect__ACSFCCP_Classic’ page and preview it. See the figure 2.4 List of VF pages after installation
  • Copy the URL, ex: if the URL is – mydomain-visual.force.com/apex/ACSFCCP_Classic
    Then copy the Mydomain url only – mydomain-visual.force.com/
    We will set this URL on the Amazon Connect to console.
  • Now, let’s move to the Amazon Connect console and select the Service console option, once inside service console, open Amazon Connect and select the Instance you created earlier.
  • Once inside the Instance settings, select the ‘Application Integration’ option and add origin (The URL we copied earlier), ex – mydomain-visual.force.com/.
    See Figure 2.5.1 Instance Setting.
decor
decor
  • Figure 2.5.1 Instance Setting
decor
decor

07. Now, let’s select the Overview in instance option and log in as an administrator, this will open up a new window with users option on the left, click the user management option and fill the following details-

  • First name, Last name, username, password, and other personal details.
  • Routing profile: Basic routing profile.
  • Security profile: Agent (Only and must).
  • Phone type: Soft phone.
decor
decor
  • Figure 2.5.2 Instance Setting
decor
decor

08. Once you complete all the above-mentioned steps, click on the login URL (EX: yourloginurl.awsapps.com/connect/login), let’s select the Overview in instance option and log in as an administrator, this will open up a new window with users option on the left, click the user management option and fill the following details.

decor
decor

3. Call recordings

Once you complete a call using the Amazon Connect service,  the AWS server stores your recordings in the S3 bucket (this only works if you have enabled the storage service with Amazon Connect and call encryption must be active) , you can retrieve the call recordings from AWS server and play them locally in Salesforce by using the below-mentioned steps:

3.1 Steps at AWS server

  1. To retrieve the call recordings, you need to write a Lambda function and add it to the Contact flow on the AWS server. You can find attached code file for contact flow Code File: 3.1 Sample_recording_behavior, which you directly import. Basically, the lambda function works as a fallback handler; once the call gets completed, the lambda function passes the necessary details to the Salesforce environment with the help of which the user can retrieve the recordings when needed: See the Figure 3.1 Lambda function code and Code File: 3.2 LambdaFunction
decor
decor
  • Figure 3.1 Lambda function code
decor
decor

02. Write an API in Salesforce, the lambda function from the AWS server will hit this API and return the contact id and mobile number, the API class will store the contact id and mobile number in a custom call recording details object and will attach this custom object to the concerned Account record.

decor
1432591614_api-code-window
Code: CallRecordingDetailsAPI
decor
decor

03. With the contact id and mobile number we got from the AWS server, hit the AWS S3 bucket API, the API will return the recording filename, we will merge this filename with the base URL to retrieve the recent recording.

decor
1432591614_api-code-window
Code: GetFileURLFromS3UsingPrefix_Controller
decor
decor

4. Conclusion

With the help of Amazon Connect, the sales reps can connect with customers directly from their Salesforce org. It is life-changing as they don’t have to hold a physical phone to communicate with customers. The data is also managed at a single source (Salesforce) and can be reviewed directly. It helps in skipping a lot of manual work. As data is being managed at a single source, the chances of data blunder are also very less. I believe the Amazon Connect and Salesforce integration must be used by companies to achieve better business outcomes.

Note: while completing the integration steps, on some browsers you might face some issues like ‘Cross domain access denied’ or ‘Same origin policy’ issue, the possible solutions are –

01. As some browsers because of high security parameters do not allow Cross domain transfer of data, there is no other option for the user other than changing the browser.

02. Go to setup and make sure you have the following settings –

  • Enable clickjack protection for customer Visualforce pages with standard headers.
  • Enable clickjack protection for customer Visualforce pages with headers disabled.
References and Important links
decor
decor
Need Help with Salesforce AWS Integration?

    Send Message
    Follow Us


    Austin, TX 78759, USA