Skip to main content

Fin Messenger: Setting up with Salesforce MIAW

How to configure and customize Fin in the Fin Messenger and pass conversations to Salesforce.

Updated yesterday

This will guide you through how to configure and customize Fin in the Fin Messenger and pass conversations to Salesforce.


1. Connect to the Salesforce Enhanced Chat API

For Fin to be able to hand-off live chats to your team in Salesforce, it needs a connection to the Enhanced Chat API. This requires an embedded service deployment to be set up in Salesforce.

Set up an embedded service deployment then connect to the API

  1. Go to embedded service deployment in Salesforce.

  2. Click New Deployment.

  3. Choose Custom Client.

  4. Give it a name (e.g. "Fin"), select your Messaging Channel, then Save. If you don't already have a Messaging Channel, you'll need to create one.

  5. Go into your new custom client, and click the publish button in the top right hand corner.

  6. Click on the Install Code Snippet link in the Code Snippet box.

  7. Copy the DeveloperName and Url attributes from the code snippet provided by Salesforce into the inputs in the form to connect.

Install and assign permissions in Salesforce

Note: Fin currently supports only one active OAuth connection to Salesforce per workspace. The only exception is for Salesforce knowledge article sync, where multiple connections are supported to allow syncing knowledge bases across different Salesforce orgs. If you need to switch your main OAuth connection, disconnect the existing one before connecting a new Salesforce instance.


2. Create a workflow

Customize the way Fin greets and responds to customers or hands off when it's unable to help by selecting Manage workflow in Deploy > Fin Messenger > Create a workflow.

Based on the hand-off option you've chosen, we've created a template to get you started.

Click on the Let Fin handle step to:

  • Set expectation for human support - Show teammates presence in a messenger conversation. Disable this if your team all work in another tool or no one is monitoring the inbox.

  • Follow up with inactive customers - Decide what happens if the customer doesn’t respond after Fin answers.

  • Ask for more information before handover - Collect more information when a customer asks to speak to the team. When collecting more information Fin may provide an additional answer—increasing the likelihood of a resolution.

  • Create Salesforce case when Fin answers - To help your team keep track of customer queries, Fin can create a Salesforce case for every conversation it resolves, or for conversations where it responds but the end user is inactive.

  • Ask for conversation rating (CSAT) - Choose to send a CSAT survey after customers interact with Fin.

  • Handle inactive conversations - Specify how long Fin should wait before a customer is considered inactive.

  • Confirmed resolution workflow - Trigger a workflow after a confirmed resolution.

You can tailor the experience further by:

  • Creating different branches based on your conditions.

  • Choosing when Fin answers.

  • Having Fin send a message.

  • Providing reply buttons.

  • Collecting data.

  • Collecting the customer reply.

  • Adding internal notes.

  • Adding an AI generated summary of the conversation.

  • Auto-classifying Case attributes based on what the customer said.

Choose how Fin hands-off an unresolved conversation

In the final hand-off path of the workflow, you can choose how Fin hands over the conversation:

  • Create a Salesforce Case: Ends the users session in Intercom and creates a Case with a conversation summary and collected data.

  • Hand-off to Salesforce Agent: Starts a live chat in MIAW for a team member to continue the conversation.

If a hand-off option has already been selected you can remove this option by hovering over it, clicking the 3 dots that appear and selecting delete.

If you choose Create Salesforce Case, you can click this action in your workflow to configure which Record Type will be used when the workflow hands off a conversation from Fin Messenger.

This Record Type will automatically apply to all new Cases created through the workflow handoff.

Tip: Use different Record Types to route or categorize Cases for specific products, customer tiers, or regions.

Once you’ve finished customizing the greeting and hand-off to your team, click Save, or Set live to enable this for the Fin Messenger (you can also come back to set this live at a later stage).


3. Manage Salesforce data

Next, open Deploy > Fin Messenger > Manage Salesforce data and click Manage data to sync your Salesforce fields and populate them with Fin.

  • Record matching: Select how Contact and Account records are matched when Fin retrieves records from Salesforce using the IDs you provide to the Fin Messenger in the JWT.

  • Pull data from Salesforce: Your Salesforce fields are now synced and available for use in the Fin platform. Fin checks for any updates to these fields when a customer opens the Messenger.

  • Push data to Salesforce: Fin adds data when it's assigned or when it replies. The data it adds depends on how you’d like it to hand off to Salesforce, which you’ll set up in the next step when you build your workflow.

    • Creating a Salesforce Case - Fin can create a case when it resolves a chat, or can’t answer a question. It automatically populates Subject, Description, Email, Transcript, and Summary, and you can populate other fields through your workflow.

    • Handing off to a Salesforce agent - If Fin can’t answer, it can hand off the chat to your team in Salesforce. It sends all conversation and customer data, and you’ll need to use Salesforce Flows to map it to your records – it can be mapped to any record.


4. Install Fin Messenger

Now you'll need to install the Fin Messenger for either your website / web app, or for your mobile app.

Install Fin Messenger for web

Choose how you'd like to install the Messenger

Firstly you will need to choose how you would like to install the messenger. If you select Code snippet, React, Angular, Vue, Ember or Shopify as the installation method, you'll have the choice of installing Intercom for website visitors without logins.

The instruction for installing Code snippet, React, Angular, Vue, Ember or Shopify will update as you select each of the options. For the methods listed that allow the installation for both Users with logins and Visitors without, you will need to copy the code snippet for each installation method you wish to use.

For Users with logins, you will need to switch on the toggle Enable connection to messenger to continue to the installation code.

Follow the instructions given

Now follow the instructions given for the method you selected. For example, if you selected Shopify you'll see the steps required for this installation method.

If you selected the Code snippet, React, Angular, Vue, or Ember method, you'll be provided with an NPM package containing a code snippet to copy and paste into the codebase of your own app. This snippet is pre-populated with your unique workspace ID, so it's ready to go.

You can also find the package directly on the NPM site.

There are several other templates available such as including the code snippet in a Basic JavaScript or Single-page app, or you can also use the Rails gem to install the snippet.

Click Copy code and paste it before the </body> tag on every page you want the Messenger to appear on your app.

After adding the code, you can visit any page where you have installed the messenger and it should appear in the bottom right hand corner or you can use the Check installation option in the install process.

If you're having trouble setting up the Fin messenger in your Salesforce portal. We have a Salesforce unlocked package that installs a Lightning Web Component (LWC) in your Salesforce Organization, which when embedded within your Salesforce portal launches the Fin Messenger.

Follow the steps documented in Embedding Fin Messenger in your Salesforce portal

Secure the Fin Messenger with JWTs

If you have the Fin Messenger installed on your site for logged in users, it's essential to secure it and prevent bad actors from impersonating your users or sending unauthorized data. ​

JSON web tokens (JWTs) prevent third parties from impersonating your logged-in users and seeing their conversations. We strongly recommend that all Fin customers enforce JWT authentication.

Install Fin Messenger for mobile

Choose your installation platform

Firstly you'll need to choose your installation platform of choice; iOS, Android or React Native. All chosen platforms have steps specific to that platform and you'll be provided with options for how to install Intercom into your mobile apps and some code snippets to help with the installation.

Initialize Intercom within your codebase

The next step is to initialize Intercom within your mobile app’s codebase. You can also manage your API keys during this step.

You’ll see code snippet options for each platform:

The code snippet options for iOS

The code snippet options for Android

The choices for React Native

  1. Swift

  2. Swift UI

  3. ObjectiveC

  1. Kotlin

  2. Java

  1. iOS

  2. Android

Generate your iOS SDK API key

  1. Go to Deploy > Fin Messenger > Install in your Fin workspace.

  2. Choose iOS as your installation platform.

  3. Follow the installation prompts and copy the API key beginning with ios_sdk-.

Note: You do not need to manually add or “hard code” the ios_sdk- prefix. It is automatically included in the generated key.

Follow the instructions

You will then need to follow the platform specific instructions to integrate the Fin Messenger in your mobile app.

The Check installation button at the end offers a success notification if the Messenger has been successfully found for your chosen installation, or it indicates whether something has gone wrong.

Secure the Fin Messenger with JWTs

If you have the Fin Messenger installed on your app for logged in users, it's essential to secure it and prevent bad actors from impersonating your users or sending unauthorized data. ​

JSON web tokens (JWTs) prevent third parties from impersonating your logged-in users and seeing their conversations. We strongly recommend that all Fin customers enforce JWT authentication.

Optional: Set up push notifications

Within this step you will again have the option of the installation platform; iOS or Android. You can configure push notifications from this section, but it will not guide you through the process. Instead our developer docs should be used for push notification setup:

React native is not offered as an option for mobile push notifications.

This optional step is marked as complete when push notifications have been detected as set up for either an iOS or an Android app.

Note: Xcode 14 is now required to build Intercom iOS SDK v13.0.0+

In Xcode 14, there are several warnings logged to the console when the SDK is installed. The warnings stem from Intercom's use of WKWebView. There is a bug in Xcode 14 that triggers these warnings, and it is not an issue that Intercom can fix.

They are just warnings and Intercom continues to function as normal when they are present.

Here are the warning messages:

  1. WKWebView Error - View Article and you see this in the console: Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit" UserInfo={NSLocalizedFailureReason=target is not running or doesn't have entitlement com.apple.runningboard.assertions.webkit}>

  2. This method should not be called on the main thread as it may lead to UI unresponsiveness.

  3. [Sandbox] Could not enable Mach bootstrap, errno = 22.


5. Live test

First you'll be asked to ensure you've given Fin sufficient training. This is important before starting live testing. The more training you provide Fin, the better its ability to answer your customer’s questions accurately.

We recommend reading our complete guide on all of the ways you can train Fin so its able to answer your customers questions as accurately as possible.

Once you've checked that Fin is sufficiently trained and customized the messenger to match your company branding, you can go to Deploy > Fin Messenger and click Live test at the top of the page.

Live testing mode:

  • Launching a live test activates Fin Messenger without impacting your customers.

  • To test on mobile, install Fin Messenger on your staging app first to test it before deploying to production.

  • Enter your website below, or add ?intercomLiveTest=true&messenger_environment=c90npiveag at the end of your URL.

This is the best way of seeing exactly how Fin in the Fin Messenger will look and behave within the website or app that you've installed it, without any customers seeing it.


6. Go live

Now you’re ready to set Fin live for your customers. Go to Deploy > Fin Messenger and select Go Live at the top of the page.

Did this answer your question?