Skip to main content

Setting Up Your Salesforce Service Cloud Connector

The Smartling Salesforce Service Cloud Connector lets support agents translate cases, chat messages, and conversation history directly in Salesforce using Smartling's Instant MT service. This article covers how to install and configure the connector in your Salesforce environment.


Prerequisites

Install the connector in Salesforce

Before you begin setup, ensure that you have installed the connector package in your Salesforce environment. You can find the connector on the AppExchange.


Create an API token

You also need a Smartling account-level API token to configure the package. You must have an Account Owner user role in Smartling to create an account API token.


Follow the steps in API Tokens to create your token. You will use it in the configuration steps below.


Configure Smartling settings in Salesforce

Info: The screenshots in this article show Salesforce Lightning. If you use Salesforce Classic, switch to Lightning to follow along.

  1. Open your organization's Setup panel.

    setup-panel.png

  2. Search for and open Custom Metadata Types.

    custom-metadata-types.png

  3. In the metadata list, find Smartling Settings and click Manage Records.

    manage-records.png
  4. Click Edit to modify the settings record ‘Smartling Settings’. On the settings page, enter your Smartling account credentials and click Save.


    You may also see a Project ID field. Leave this field blank. The connector uses your account-level API token and does not currently require a project ID.

    Note: There must be only one Smartling Settings record. To update values, either edit the existing record or delete the current record and create a new one.

    custom-metadata-types.png
  5. Return to Setup Home.

  6. Search for and open Named Credentials.

    named-credentials.png

  7. Open the External Auth Identity Providers tab.

    external-auth.png

  8. Select Smartling OAuth and click Edit.

    OAuth.png

  9. In the Client Identification section, enter your Smartling User Identifier as the Client ID, and your User Secret as the Client Secret. These are the credentials you created earlier.

    client-id.png

  10. Click Save.
    ​

Set up the chat translation component (Messaging / Enhanced Chat)

  1. Open your organization's Setup panel.

    setup-object-manager.png

  2. Open Object Manager and find the Messaging Session object.

    messaging-session-object.png

  3. Navigate to Lightning Record Pages and open the page your agents use.

    lightning-record-pages.png

  4. Click Edit.

  5. Find the Smartling Chat Translation component in the component palette and drag it onto your page.

    Note: Place this component near the standard conversation component for it to work properly.

    smartling-chat-translation.png

  6. In the End User Locale Field, enter the API name of the field on the MessagingSession object that contains the end user's locale. The connector reads this field to determine the translation language pair.


    ​Requirements:

    • The field must belong directly to the MessagingSession object. If the locale value lives on a related object (such as Contact or Case), create a formula field on MessagingSession that pulls the value in.

    • The value must be a Salesforce locale code (for example, en_US, fr), not a language name. See Salesforce's Supported Locales documentation for the full list of valid locale codes.


    ​How language detection works:

    • The chat component first checks the MessagingSession field specified in End User Locale Field.

    • If that field is empty or End User Locale Field was not configured, the connector falls back to automatic language detection. It uses the Smartling Language Detection API to detect the end user's language from their chat messages.


    ​Using Salesforce's built-in language detection: If you want Salesforce to detect the language from the web portal where the end user started the chat, enter EndUserLanguage in the End User Locale Field. For information on how to enable this option, see the Salesforce documentation.

    end-user-locale-field.png

  7. Click Save.


Set up the case translation component (Web-to-Case / Email-to-Case)

Info: The case translation component only translates fields that appear in the case feed. If you need to translate additional case fields, you must create an automation, such as a Salesforce Flow, that copies those field values into the case feed.

  1. Open your organization's Setup panel.

    setup-object-manager.png

  2. Open Object Manager and find the Case object.

    case-object.png

  3. Navigate to Lightning Record Pages and open the page your agents use.

    lightning-record-pages-case.png

  4. Click Edit.

  5. Find the Smartling Case Translation component in the component palette and drag it onto your page.

    smartling-case-translation.png

  6. In the End User Locale Field, enter the API name of a field on the Case object that contains the end user's locale code (for example, en_US). The value must be a Salesforce locale code, not a language name. See the Smartling to Salesforce language mapping for supported codes.


    ​How language detection works:

    • The case component first checks the field specified in End User Locale Field.

    • If that field is empty or was not configured, the connector falls back to automatic language detection. It sends the content of the field specified in End User Locale Detection Field (see next step) to the Smartling Language Detection API to identify the end user's language.
      ​

  7. In the End User Locale Detection Field, enter the API name of a Case field that contains the end user's text (for example, the case description or subject). The connector sends this text to the Smartling Language Detection API to identify the end user's language when the End User Locale Field is empty or not configured.

    end-user-language.png

  8. Click Save.


Conversation Data API setup (Salesforce Platform API)

Conversation history translation reads conversation entries from the Salesforce Conversation Data API. Complete these steps once per organization. Then each agent connects their own Salesforce account (see Agent connection below).


Enable Conversation Service APIs

  1. Open your organization's Setup panel.

  2. In Quick Find, search for Conversation Service APIs and open Conversation Service APIs (Setup → Conversation Service APIs → Conversation Service APIs).

    conversation-service-apis

  3. Enable the setting.

Create an External Client App

  1. In Setup, search for External Client App Manager and click New External Client App.

  2. Enter a name (for example, Salesforce API) and a contact email.

  3. In the OAuth settings, select Enable OAuth.

  4. Set Callback URL to the Callback URL shown on the Salesforce Platform OAuth external auth identity provider (Setup → Named Credentials → External Auth Identity Providers → Salesforce Platform OAuth). Open it in a second tab and copy the value. For example, https://login.salesforce.com/services/extidp/callback.

  5. Under OAuth Scopes, add Access the Salesforce API Platform (sfap_api) and Perform requests at any time (refresh_token, offline_access).

    app-settings

  6. Keep PKCE enabled.

  7. Create the app. In its policies, set Permitted Users so that all users can self-authorize.

  8. Copy the app’s Consumer Key and Consumer Secret.

Note: Changes to an External Client App can take about 10 minutes to apply.


Set up the Salesforce Platform OAuth identity provider

  1. Return to Setup Home and open Named Credentials.

  2. Open the External Auth Identity Providers tab.

  3. Select Salesforce Platform OAuth and click Edit.

  4. In the Client Identification section, enter the Consumer Key as the Client ID and the Consumer Secret as the Client Secret.

    sf-platform-oauth

  5. Click Save.

  6. Sandboxes only: Change the Authorize URL and Token URL from login.salesforce.com to test.salesforce.com.

Agent connection

The first time an agent opens a conversation history record, the component shows a Connect button. Clicking it opens the Salesforce consent page. After the agent approves, they return to the record. Agents can also manage the connection from their avatar → Settings → External Credentials.


Agents need a Smartling permission set that includes the Salesforce_Platform_API - Salesforce external credential principal access: Smartling Chat User, Smartling Voice User, or Smartling Admin (see Permission sets below).


Set up the conversation history translation component (ended Voice Calls and Messaging Sessions)

The Smartling Conversation History Translation component shows the whole transcript of an ended Voice Call or Messaging Session, with a translation under each message. It is read-only. A record that has not ended shows an information message instead of a transcript. Voice Call history needs Service Cloud Voice; Messaging Session history works in any org with Messaging.

  1. Open your organization’s Setup panel.

  2. Open Object Manager and find the Voice Call or Messaging Session object.

  3. Navigate to Lightning Record Pages and open the page your agents use.

  4. Click Edit.

  5. Find the Smartling Conversation History Translation component in the component palette and drag it onto your page.

  6. Optional: In the End User Locale Field, enter the field on the record that contains the end user's language as a locale code (for example, en_US). See the Smartling to Salesforce language mapping for supported codes.

  7. Optional: Select Translate automatically to translate the conversation as soon as it loads. When cleared (default), the agent opens the language panel (globe button) and clicks Translate.

  8. Optional: Select Detect language automatically to detect the end user's language from the conversation messages when no language is stored. When cleared (default), the agent picks the language in the language panel. After a package upgrade, existing placements stop detecting automatically unless this is selected.

  9. Set the component visibility filter to the custom permission Smartling Conversation History User, so that only users with the package permission see the component.

    end-user-locale-field

  10. Click Save.


How the agent's language is determined

Both the Chat and Case translation components read the agent's language from the LanguageLocaleKey field on the agent's Salesforce user record. This value determines the target language for translating end-user messages into the agent's language, and the source language when translating the agent's replies back to the end user.


Permission sets

To grant users access to the connector's components, assign one of the following permission sets:

Smartling Chat User: Grants access to the chat translation component and conversation history translation for ended Messaging Sessions.
​Smartling Voice User: Grants access to conversation history translation for Voice Calls (requires Service Cloud Voice).
​Smartling Case User: Grants access to the case translation component.
​Smartling Admin: Grants access to update Smartling settings.
​Smartling Super User (permission group): Includes all Smartling permissions (Chat User, Case User, Voice User, and Admin).


Assign permission sets

  1. Open your organization's Setup panel.

  2. Search for and open Permission Sets.

    permission-sets-assign.png

  3. Find and select the desired permission set.

    permission-sets.png

  4. Click Manage Assignments.

    manage-assignments.png

  5. Click Add Assignment.

    add-assignment.png

  6. Select a user and click Next.

  7. Click Assign.

    assign-permissions.png


Configure Instant MT settings in Smartling

Both case and chat translation use Smartling's Instant MT service. To configure your preferred MT or LLM translation provider, log into your Smartling account. You must have an Account Owner or Project Manager user role.

  1. From the top navigation of your Smartling dashboard, open AI Hub.

    image.png

  2. In the Instant MT section, select the Salesforce Service Cloud tab.

  3. Enable Machine Translation for Salesforce Service Cloud.

  4. Choose your preferred Profile. You can also configure language-specific profiles if needed.

  5. Optionally, insert glossary terms in machine translations to enforce preferred terminology.

instant-mt-settings.png

Once enabled, agents can use Instant MT to translate cases, chat messages, and conversation history directly in Salesforce Service Cloud.

Smartling to Salesforce language mapping

Info: Download the Smartling-to-Salesforce language mapping table below for the full list of supported locale codes and their Smartling equivalents.

Did this answer your question?