Salesforce
Integrate Salesforce Sales Cloud with Kustomer to share customer and conversation data.Articles
Create cases in Salesforce
The Salesforce 1.1.0 upgrade added the ability to create cases in Salesforce Sales Cloud from actions performed in Kustomer through the use of a managed package. This article will walk you through the configuration process to add this feature to your Kustomer organization's integration with Salesforce.Who can access this feature?User typesAdmins set up this integration. Available to Salesforce plans on Enterprise Edition, Unlimited Edition, and Performance Edition.In this articlePrerequisitesHow does Salesforce case create work?Install the Kustomer managed package for SalesforceSelect a case appearance option Option A: Create a record typeOption B: I don't want to create a record typeTurn on the case-sync workflow in KustomerActivate a business rule for automatic syncConversation view in SalesforceDefault field mappingsPrerequisitesYou must complete the install and configuration steps in the help article Integrate with Salesforce before you can proceed with the setup steps in this article.Your Salesforce plan must include API access in order to install the managed package. This includes Enterprise Edition, Unlimited Edition, and Performance Edition. Customers on Professional Edition are unable to install the managed package at this time due to feature limitations in Salesforce for this edition. Learn more about API access limits on the Salesforce site: API Request Limits and AllocationsYou will need to have access to the same Salesforce Sales Cloud account that was used to configure your existing integration with Salesforce. Kustomer will connect to Salesforce Sales Cloud using OAuth 2.0. You'll need to have access to a Salesforce account that has the requisite permissions to access API.We also recommend that you already be comfortable with the basics of business rules in Kustomer: Business Rules Overview Admins will also be activating an app-created workflow during the setup process. It is not required to understand or customize this workflow to activate it. However, for some advanced use cases that require further customization of this Salesforce integration, it's possible to modify a copy of the workflow. If this applies to your org, you can familiarize yourself with Kustomer workflows in: Workflows OverviewHow does Salesforce case create work?All of the configuration settings related to the Salesforce Case Create feature can be located in the Salesforce app settings, under the Data Sync tab. This aspect of the Salesforce Sales Cloud integration adds a one-way directional sync from Kustomer to Salesforce which allows you to create cases in Salesforce from conversations in Kustomer. This operates through a Salesforce managed package and a Kustomer app-created workflow named salesforce-case-create, and optionally a business rule.Once this is set up, you can use the toggle in the Create cases in Salesforce header to activate or deactivate the workflow that powers this feature.When Create cases in Salesforce is turned on, the salesforce-case-create workflow will sync a Kustomer conversation with a Salesforce Sales Cloud case when the Sync To Salesforce conversation attribute is set to True, and when the conversation is not marked as spam.There are two available methods to sync conversations with this attribute:Automatic: Set up a Business Rule that syncs to Salesforce automatically, based on any trigger or filters you choose.Manual: In the Insights Panel when viewing a conversation, agents can set the Sync To Salesforce property to True to create a case from this individual conversation.After creating a case from Kustomer, you will be able to view details from that conversation in Salesforce Sales Cloud.Install the Kustomer managed package for SalesforceThe first step in this integration will be to install the Kustomer application in Salesforce Sales Cloud.In Kustomer, go to Apps and select Salesforce in the sidebar.Select the Data Sync tab.The Install Kustomer managed package for Salesforce section will show the current installation status of the add-on. The status will initially appear as Incomplete, as seen below. Select the Install link.Note: If another administrator has already installed the Kustomer managed package, the status will show as Installed instead. If the latest add-on is successfully installed, you can skip to the next section.On the Salesforce website, log in with your Salesforce Sales Cloud credentials.Select Install for All Users.Check the box that acknowledges you are installing a non-Salesforce application.Select Install.Accept *.sentry.io as a trusted site when prompted. (Sentry is a monitoring platform we use to log any errors that occur in our custom components.)After successful installation, you will find custom fields in the Salesforce Object Management Settings, under Setup > Object Manager > Cases > Fields & Relationships. You can find a list of the default field mappings later in this article in the section Default field mappings.More information about managing objects can be found on the Salesforce site here: Salesforce: Find Object Management SettingsSelect a case appearance optionOnce the managed package add-on is installed, you'll decide how cases from Kustomer will appear in Salesforce.In Kustomer, navigate back to Apps > Salesforce > Data Sync.In the Create cases in Salesforce section, select the pencil icon next to Case appearance.A popup will appear where you'll select a method to control how Kustomer conversations are sent to Salesforce as cases. You have two options:The recommended method is to use a record type, which makes it easier to tell which cases in Salesforce originated in Kustomer.Option A: Create a record type in SalesforceIf you select the first option, you'll proceed by creating a record type in Salesforce to associate with Kustomer cases.To create a record type:In Salesforce, go to Setup > Object Manager > Case > Fields & Relationships. (Learn more in Salesforce: Find Object Management Settings in Lightning Experience)Select New from the toolbar.Create a support process for Kustomer Conversations, if prompted.On the Step 1. Enter the details screen, create the record type with the following characteristics:Existing Record Type: MasterRecord Type Label: Kustomer ConversationKustomer Type Name: Kustomer_ConversationSupport Process: Kustomer ConversationFollow the remaining instructions to create the record type, and check boxes in the Make Available column as needed by your team.Select Next at the bottom of the page.On the Step 2. Assign page layouts screen, apply the Case Layout (Installed Package: Kustomer) layout to the Salesforce profiles that you wish to allow to view the custom Case fields.When finished, select Save at the bottom of the screen.After creating the record type, find the record ID.Return to the Case appearance settings in Kustomer, and paste this record ID into the Record Type ID field.Select Save Changes to close this popup.Option B: I don't want to create a record typeIf you choose not to create a record type, you will need to apply the Kustomer layout to profiles using the Page Layout Assignment settings in Salesforce.In Salesforce, go to Setup > Object Manager > Case > Case Page Layouts.Select the Page Layout Assignment button in the toolbar.Select Edit Assignment.Edit the assignments as desired, then save. More information about this process is available on Salesforce: Assign Page Layouts to Profiles or Record TypesReturn to the Case appearance settings in Kustomer, and check the box to let us know this setup step is complete. Then select Save Changes.Turn on the case-sync workflow in KustomerInstalling the latest version of the Salesforce app in Kustomer will create a workflow for this sync. The next step will be to activate this workflow from the Salesforce app settings.To activate the Salesforce workflow:In Kustomer, go to Apps > Salesforce > Data Sync.Locate the toggle in the header within the Create cases in Salesforce section. You can now use this toggle to activate or deactivate Salesforce Case Create features.Activate a business rule for automatic syncIf your organization wants to automatically sync conversations with Salesforce, you can set up a Business Rule to act on the Sync To Salesforce conversation attribute, based upon any trigger and filters you choose.Before you begin, you'll want to decide on what criteria your organization should use to trigger this sync. This is entirely customizable, so consider what criteria would best fit the needs of your organization. Here are some examples of potential criteria you might filter on:Marking a conversation Done triggers a sync to SalesforceApplying an Important tag to a conversation syncs it to SalesforceTo set up the business rule:In Kustomer, go to Apps > Salesforce > Data Sync.Use the Configure link in the Automatic Sync section to be taken to the Business Rules settings.Select Add Rule.Fill out the Name and Description of this rule. We always recommend as a best practice that you use clear and illustrative names and descriptions, so that it's easy to know what function this rule performs if another member of your team reviews this rule at a later date.Fill out Set Trigger and Conditions as desired.Under Set Actions, use the Select Action Type menu to choose Update Data.Fill in the remaining fields to Conversation - Sync To Salesforce - Replace With - True.The finished rule can now be saved, and you can activate the business rule whenever you wish for it to take effect.Conversation view in SalesforceAfter case create is configured through this article, you can continue on to set up a conversation view for Kustomer conversations in Salesforce. Learn more in View conversations in Salesforce.Default field mappingsFor reference when modifying any of the field mappings, here is a list of the default field mappings for this integration:KustomerSalesforceAccountId of the contact in Salesforce, matched by the customer’s emailAccountIdId of the contact in Salesforce, matched by the customer’s emailContactIdpreviewDescriptiondefaultLangLanguage"Kustomer App"OriginassignedUsersKustomerApp_Conversation_Assignee_NamepriorityPrioritystatusStatusnameSubject"Kustomer Conversation"TypeidKustomerApp_Conversation_IdsatisfactionLevel.scoreKustomerApp_Conversation_CSAT_ScoresatisfactionLevel.ratingKustomerApp_Conversation_CSAT_RatingcreatedAtKustomerApp_Conversation_CreatedAtupdatedAtKustomerApp_Conversation_UpdatedAtmodifiedAtKustomerApp_Conversation_ModifiedAtlastMessageIn.sentAtKustomerApp_Conversation_LastMessageInSentAtConversation URLKustomerApp_Conversation_URLIntegrate with Salesforce
Salesforce is a major CRM platform used by sales teams and businesses worldwide. Kustomer can integrate with Salesforce Sales Cloud to allow your customer support and sales team to gain a more complete picture of your clients through the use of a Salesforce Insight Card.Who can access this feature?User typesAdmins can install and manage the Salesforce integration. Available to Salesforce plans that include API access: Enterprise Edition, Professional Edition with API access, Unlimited Edition, and Performance Edition.In this articlePrerequisitesHow does Salesforce work with Kustomer?Install the Salesforce appSalesforce app settings overviewManage access policies in SalesforceMonitor API calls in SalesforceModify Data Visibility settingsCase creation in SalesforcePrerequisitesBefore you set up Salesforce integration, your Salesforce Sales Cloud data should be in an optimized state. Kustomer uses email addresses as a unique identifier and retrieves data in Salesforce matching that email. We strongly recommend that your Salesforce Sales Cloud administrator set up matching/deduplication rules and resolve duplicate records before you attempt to set up integration on the Kustomer end. Salesforce offers recommendations for optimizing data quality on their help site here: Managing Duplicate RecordsKustomer will connect to Salesforce Sales Cloud using OAuth 2.0. You'll need to have access to a Salesforce account that has the requisite permissions to access API. This can be any Salesforce admin account, or you can create a dedicated user for this integration if you plan to Monitor API calls in Salesforce.How does Salesforce work with Kustomer?This integration adds a Salesforce Insight Card that appears automatically when looking at a Customer or Conversation in the timeline. Administrators can use the App Settings to choose from several Salesforce Sales Cloud objects to be shown to admins in the Salesforce Insight Card.Kustomer will use email addresses as a unique identifier, and retrieve data in Salesforce Sales Cloud matching that email. The Salesforce Insight Card displays Salesforce Account, Contact, Opportunity, and Lead information associated with that address to agents working in the Kustomer timeline.After the initial Salesforce integration is configured through this article, you can continue on to set up one-way directional sync from Kustomer to Salesforce to create cases and view Kustomer conversations. Learn more in Create cases in Salesforce and View conversations in Salesforce.Note: Due to Salesforce API limitations, there is a cap to the volume of API calls that Kustomer can make to Salesforce Sales Cloud. If the API rate limit is exceeded, Kustomer will locally cache Salesforce data in the event that up-to-date data cannot be retrieved. This cache includes any Customer or Conversation objects viewed by any agents within the 24-hour period prior to the API rate limit.Installing the Salesforce app will add a Salesforce Settings page under Apps > Salesforce in the sidebar, which is used to manage the various options related to this integration.Install the Salesforce appTo begin integrating Salesforce with Kustomer, install the Salesforce app from within the Kustomer App Directory.Note: The Salesforce integration must be installed on a production environment. Please do not install it in a sandbox.Go to Apps , search for Salesforce in the App Directory, and then select Install. This will bring up a Connect modal where you'll authenticate using your Salesforce account. If the Salesforce app is already installed in your org but not configured, select the Add Connection button to access the authentication screen.In the Initial Information step, enter your Salesforce subdomain, then click Next to confirm and proceed. Tip: Your Salesforce subdomain is is the entire prefix before the .salesforce.com portion of your Salesforce domain, and will be formatted like salesforce-org-name or salesforce-org-name.my. Depending on which Salesforce view you're using, this can be located in either the URL field of your browser (in Salesforce Classic), or by selecting your profile icon (in Salesforce Lightning).In the Authorize step, click Connect to Salesforce to sign in to Salesforce using your OAuth 2.0 credentials.On the login page that appears, enter your Salesforce account credentials and select Log In.In the Allow Access prompt, select Allow to confirm access.The Connect modal in Kustomer should now say the app has been successfully connected. Select Install to complete app setup.Salesforce app settings overviewAfter installing and connecting Salesforce, you can visit Apps > Salesforce to access the Salesforce app settings. Here is where you'll make adjustments to the various features offered within the Salesforce integration.In the View Options tab, you can adjust the Data Visibility settings where you'll select which objects your agents have access to view in the Salesforce Insight Card. Access for all objects is activated by default. These settings can be mixed and matched to your team's preference — however, note that Contacts must be turned on to view Leads.In the Data Sync tab, you can set up features that add one-way directional sync from Kustomer to Salesforce to create cases and view Kustomer conversations. Learn more in Create cases in Salesforce and View conversations in Salesforce.In the Connection tab, you can manage the account used to connect this integration, and modify the subdomain in case your Salesforce URL changes.Manage access policies in SalesforceNext, you'll install the Kustomer connected app in Salesforce. This step will allow you to manage access policies for the connected Kustomer app. Learn more about managing connected apps on the Salesforce site here: Salesforce: Connected AppsTo install the Kustomer connected app in Salesforce:Sign in to Salesforce Sales Cloud as an administrator.Go to Setup > Apps > Connected Apps > Connected Apps OAuth Usage. This page may take a few minutes to load.Locate Kustomer Connected App in the list and use the Install button to activate it, if it's not already installed.To manage policies for the Kustomer app, go to Setup > Apps Connected Apps > Manage Connected Apps.Locate Kustomer Connected App in the list, and use the Edit link to open its properties.Set the IP Relaxation setting to Relax IP restrictions.Set the Refresh Token Policy setting to Refresh token is valid until revoked.Press Save at the bottom of the window.Monitor API calls in SalesforceIf you plan to monitor API calls in Salesforce, you may wish to set up a dedicated Salesforce account. While you can configure the Salesforce integration with any account that has appropriate permissions, monitoring API calls on that user will show a mix of all API calls in aggregate across all authorized applications.As a best practice, you can create a unique account for the Salesforce integration which would allow you to see only the Salesforce app attributed calls. This would help you isolate traffic associated with Kustomer to monitor costs associated with this app integration.To create a Kustomer API user in Salesforce:Create a user in the Salesforce org for this API account, with a name like Kustomer API User or other illustrative name.Give the new user the appropriate User Permissions to allow API access. Install the Salesforce app. When authenticating with OAuth 2.0, use the credentials associated with the Kustomer API User. You can now monitor API calls attributed to that user from within Salesforce. For more information, see the Salesforce help article: Monitor or report on API useModify Data Visibility settingsAccess to all Salesforce Sales Cloud objects is activated by default. If you need to adjust which objects appear to agents in the Salesforce Insight Card, you can make these changes in the Data Visibility settings.To modify access to Salesforce objects:In Kustomer, go to Apps > Salesforce.Select the View Options tab.Use the toggles next to the Accounts, Contacts, Opportunities, and Lead options to adjust agent access as desired.Note: Contacts must be turned on in order to view Leads. It isn't possible currently to show Leads while hiding Contacts.If necessary, you can also deactivate this aspect of the Salesforce app integration altogether and hide the Salesforce Insight Card and custom object views. This setting can be toggled off without impacting other Salesforce app functionality.To turn off the Salesforce Insight Card:In Kustomer, go to Apps> Salesforce.Select the View Options tab.Use the toggle in the Data Visibility header to activate or deactivate this feature.Case creation in SalesforceAfter the initial Salesforce integration is configured through this article, you can continue on to set up one-way directional sync from Kustomer to Salesforce. Learn more in Create cases in Salesforce.View conversations in Salesforce
Conversation View allows Salesforce users to view Kustomer conversations from a Salesforce case directly within the Salesforce platform. This feature builds on the existing Salesforce Case Create functionality, and adds more detail and context to those cases from Kustomer by displaying conversation messages directly in Salesforce Sales Cloud.This article will walk you through the configuration process to add this feature to your Kustomer organization's integration with Salesforce.Who can access this feature?User typesAvailable to Salesforce plans that include API access: Enterprise Edition, Professional Edition with API access, Unlimited Edition, and Performance Edition.In this articlePrerequisitesHow does Conversation View work?Update managed packageApply a token to named credentialAdd the Kustomer component to the case pagePrerequisitesYou must complete the install and configuration steps in the help article Integrate with Salesforce and Create cases in Salesforce before you can proceed with the configuration steps in this article.You will need to have access to the same Salesforce Sales Cloud account that was used to configure your existing integration with Salesforce. Kustomer will connect to Salesforce Sales Cloud using OAuth 2.0. You'll need to have access to a Salesforce account that has the requisite permissions to access API.Lastly, in order to add the component to a page, the Salesforce instance must be on a My Domain.Note: The Salesforce app in the Kustomer App Directory does not need to be updated to add this functionality. If the Case Create feature is set up with the Salesforce managed package v1.1.2 or later, you'll be able to set up the conversation view.How does Conversation View work?Any case created by the Salesforce app's Case Create feature will retrieve and display a conversation view for that case directly within the Salesforce platform on the case page. Users can view Kustomer conversation messages for any message channel supported by the Kustomer platform, and view or download attachments for those messages from within Salesforce.This conversation is entirely read-only, and cannot be edited by users from within Salesforce Sales Cloud.Update managed packageThe first step in this process will be to update the Salesforce managed package to the latest version, if you haven't already done so. If you've just finished the Salesforce Case Create setup before arriving at this article, you can skip to the next step.In Kustomer, go to Apps > Salesforce.Select the Data Sync tab.Verify if the managed package add-on needs to be updated. If the status is listed as Installed, you can skip to the next section.If the status is listed as Update Available, use the Update link to be taken to the Salesforce site where you can proceed with setup.Sign in to the Salesforce site as an administrator.Select Install for All Users.Check the box that acknowledges you are installing a non-Salesforce application.Select Install.Accept *.sentry.io as a trusted site when prompted. (Sentry is a monitoring platform we use to log any errors that occur in our custom components.)Apply a token to named credentialNext, you'll create an API key in Kustomer to use with the Salesforce integration.In Kustomer, go to Settings > Security > API Keys to create an API key in Kustomer with the following roles:org.permission.message.readorg.permission.customer.readorg.permission.conversation.readorg.permission.user.readorg.permission.attachment.readCopy the created API token to your clipboard.Log in to your Salesforce Sales Cloud site and select Setup.From the left sidebar, use the Search field to locate and open the Named Credentials settings.Find the Kustomer API named credential in the list, then select Edit.Paste the API key from Kustomer into the Password field.Select Save.Add the Kustomer component to the case pageNow that you've connected your Kustomer account to the named credential endpoint, you'll set up how Kustomer Case Conversations appear to users who view the case on the Salesforce site.Go to the case page in Salesforce.Select the gear icon in the toolbar, then select Edit Page.Find the Custom - Managed category in the Sidebar to locate the Kustomer_Case_Conversation component, then drag it to wherever you'd like to place it on the page.To enable agents to view this page, select the Activation button in the toolbar.Follow the instructions to set the page as the Org Default, App Default, or to activate it for certain record types or profiles as you prefer.Select Save, then use the back arrow at the top-left corner of the page to exit.Custom attribute matching in Salesforce
The Kustomer and Salesforce integration offers an advanced setup method that extends the app's functionality through customizing the case sync workflow. This article will describe how to modify the workflow to customize payloads sent to Salesforce, allowing the option of custom attribute matching from your Salesforce data.Who can access this feature?Available to Salesforce plans that include API access: Enterprise Edition, Professional Edition with API access, Unlimited Edition, and Performance Edition.In this articlePrerequisitesDuplicate the case sync workflowCustomize the workflowWorkflow payloadsSave and activate the workflowPrerequisitesYou'll need to finish all the setup steps in Integrate with Salesforce and Create cases in Salesforce before this advanced configuration can be set up.You will also need to be familiar with the basics of using Workflow automations in Kustomer to make the changes outlined in this article. Learn more about this concept in Workflows Overview.Duplicate the case sync workflowApp-installed workflows cannot be directly customized, so to make the required changes to this workflow, you'll need to begin by creating a copy of the Salesforce workflow.To duplicate the Salesforce workflow:In Kustomer, go to Settings > Platform > Workflows.Select the App Created tab.Use the search field or scroll down in the list to locate the salesforce-case-syncworkflow.Note: If you plan to immediately activate the new custom workflow, now would be a good time to turn the original workflow off by using the toggle. Otherwise, make a note to return here later to deactivate the original workflow when you're ready to go live.Select the menu icon, then select Duplicate.You'll see a Workflow created notification in the bottom corner of the screen to indicate this was successful. You should now be able to locate your custom workflow in the User Created tab under the name copy-salesforce-case-sync. That's probably not a very memorable name, so we'll update it in the next step.Customize the workflowNext, you'll modify the workflow to allow for custom attribute matching.To update the custom workflow:In the Workflows Settings, switch to the User Created tab. Locate the copy-salesforce-case-sync workflow, and select the Editicon to its right.The Workflow Editor will open. Start by selecting the Moremenu icon in the toolbar, then select Edit Info.In the Edit Workflow Info panel, update the name and description as you prefer, then press Save.Note: We always recommend as a best practice that you use clear and illustrative names and descriptions, so that it's easy to know what function this automation performs if another member of your team reviews this workflow at a later date.Scroll to the bottom of the workflow. After the last action, add a new action step with the following properties:Action InformationAction Title: Command Run By NameAction Description: (optional)Action App: KustomerAction Event: Command Run By NameRequired fieldsName (string): kustomer_salesforce.app.kustomer.kustomer_salesforce.commands.upsert-with-external-id Optional FieldsArgs: (leave empty)Body: see belowHeaders: (leave empty)UrlArgs: see belowThe result will look something like this:Before you can save and activate the workflow, you'll need to fill in the payloads as specified in the next section.Workflow payloadsThe Body and UrlArgs fields in the workflow are where you'll provide a payload for your custom attribute matching.BodyThis is the payload that you want to send on the request to Salesforce. The general format of this payload will be as follows:{ “SalesforceCustomAttribute1”: “TargetKustomerValue1” “SalesforceCustomAttribute2”: “TargetKustomerValue2” “SalesforceCustomAttribute3”: “TargetKustomerValue3” }One potential example for how this might be used is the following payload, which syncs over certain fields that are manually assigned to conversations:{ "Kustomer_Conversation_App_and_Resolution__c": "{{steps.1.custom.appResolutionStr}}", "Kustomer_Conversation_Business_Impact__c": "{{steps.1.custom.businessImpactStr}}", "Kustomer_Conversation_Contact_Reason__c": "{{steps.1.custom.cxContactReasonTree}}", "Kustomer_Conversation_Effort_to_resolve__c": "/#fn:parseInt,steps.1.custom.effortNum", "Kustomer_Conversation_Escalated__c": "{{steps.1.custom.escalatedBool}}", "Kustomer_Conversation_Jira_Issue__c": "{{steps.1.custom.jiraIssueStr}}" }UrlArgsThese are the arguments that are used to construct the URL to which the request is made. Here's an example:{ "version": "v42.0", "sobject": "Case", "externalIdAttribute": "KustomerApp__Conversation_ID__c", "externalId": "/#steps.1.id" }version: whichever version of the Salesforce API you choose to usesobject: the type of object you are modifyingexternalIdAttribute: the name of the external identifier that exists on the sobjectexternalId: the value of the externalIdAttribute. In the above example, it is the Kustomer conversation ID.Save and activate the workflowAfter setting up your payloads, you can modify any other aspects of the Attribute Matching workflow as you need. When you're all finished, select the Save button in the toolbar above the editor to commit your changes.When you're ready to activate the workflow, you can turn it on by using the toggle at the top of the workflow editor, or in the list of workflows.Note: Remember to turn off the original salesforce-case-sync app-installed workflow, if you didn't already do so earlier. Running multiple versions of the workflow simultaneously can cause errors or unpredictable results.When the workflow command is run, it will perform a request to the following URL:https://your-salesforce-subdomain.salesforce.com/services/data/:version/sobjects/:sobject/:externalIdAttribute/:externalIdUsing the examples outlined in this article, the URL would be:https://your-salesforce-subdomain.salesforce.com/services/data/v42.0/sobjects/Case/KustomerApp__Conversation_ID__c/6140cefd91ffddd18144e08b
Still need help? Contact Us