Close Menu
SalesforceCodex
    Facebook X (Twitter) Instagram
    Trending
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    • How to Suppress PMD Warnings in Salesforce Apex
    • Top 10 PMD Issues Salesforce Developers Should Focus on in Apex
    • How to Use Graph API for Outlook-Salesforce Connection
    Facebook X (Twitter) Instagram
    SalesforceCodex
    Subscribe
    Thursday, May 29
    • Home
    • Architecture
    • Salesforce
      • News
      • Apex
      • Integration
      • Books Testimonial
    • Questions
    • Certification
      • How to Prepare for Salesforce Integration Architect Exam
      • Certification Coupons
    • Integration Posts
    • Downloads
    • About Us
      • Privacy Policy
    SalesforceCodex
    Home»Salesforce»Integration»Low Code Integration for Text Translation using SysTran API

    Low Code Integration for Text Translation using SysTran API

    Dhanik Lal SahniBy Dhanik Lal SahniJuly 2, 20232 Comments8 Mins Read
    Facebook Twitter Pinterest LinkedIn Tumblr Email
    Text Translation in Salesforce
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Text translation is converting text from one language into another while preserving its meaning and context. It allows individuals and businesses to bridge language barriers, communicate effectively across cultures, and access information in different languages.

    Text translation can be performed manually by proficient bilingual individuals or by utilizing automated translation tools and technologies. Automated translation tools often employ machine translation algorithms, which use statistical models or artificial intelligence to generate translations. Some popular text translation services and tools include Google Translate, Microsoft Translator, DeepL, SysTran API, and many others. This post will use SysTran API to translate the text with a low-code approach.

    About Systran Translation API

    SysTran Translation API is used to perform translations. It is a tool that automatically translates text from one language to another. Systran is the first company to offer machine translation for commercial purposes. This API provides a translation of text and files as well.

    Few Systran API endpoints:

    • https://api-translate.systran.net/translation/text/translate
    • https://api-translate.systran.net/translation/file/translate

    The first API translate the given text into the required language and the second API will translate the complete uploaded document. There are other many APIs available to get the status and create a batch to translate many documents in one go. You can check all API documents in their API documentation. As part of this post, I have used the first API.

    Business Use Case

    Text Translation has many use cases. It can be used in obtaining fast and reliable translated content. Below are some Important use cases where this can be used.

    1. Internal emails and communications
    2. Technical documentation and product instructions
    3. Writing Manuals in different languages
    4. Writing Product Reviews
    5. Supporting Chat and messages
    6. Customer Inquiries

    As this kind of API is part of Machine Language translation. I have written other posts related to these topics. You can also visit those to learn more about this topic.

    • Audio to Text by Google Speech API in Salesforce Lightning
    • Running Salesforce App using Voice command – Speech-To-Text API
    • Add Text-to-Speech Capability in Lightning Component

    Steps Required for Text Translation in Salesforce

    To handle text translation using a low code approach, we will use the below steps

    1. Get SysTran API Access
    2. Create External and Named Credential
    3. Create a Permission set and Assign it to User
    4. Create a Custom Metadata Type for Langauge
    5. Create Flow to Integrate API and Show Translation
    6. Test the Flow

    1. Get SysTran API Access

    As we need to implement SysTran API for text translation. We need access to this API. Luckily this API is free to create POC and test functionality.

    Create a personal account on the SysTran website by providing the required information. It will send a verification email. Verify your account and login into its dashboard. Open the profile page and create API Key on this page.

    Here is the Get URL for this API. Change the API Key with your created key.

    https://api-translate.systran.net/translation/text/translate?key=*****-ad*b-482f-a0b5-*****&source=en&target=de&input=Hello, hwo are you today? 

    Sample Response JSON

    {
        "outputs": [
            {
                "output": "Hallo, wie geht es dir heute?"
            }
        ]
    }

    2. Create External and Named Credential

    To use external API using Flow Builder we have to create one External Credential and One Named Credential. These are required for easily maintaining external API callouts.

    External Credential

    An external credential represents the details of how Salesforce authenticates to an external system via an authentication protocol. Let us create external credentials with the below details

    PropertyProperty Value
    LabelSysTran Translator API EC
    NameSysTranTranslatorAPIEC
    Authentication ProtocolCustom
    Text Translation - External Credential in Salesforce

    Create a Principal named SysTranPrincipal on the above-created External Credential page.

    PropertyProperty Value
    *Parameter NameSysTranPrincipal
    *Identity TypeNamed Principal
    Sequence Number1

    Once the principal is created this external credential can be assigned to the permission set. We will assign this named principal to the permission set in 3rd step.

    Named Credential

    A named credential specifies the URL of a callout endpoint and its required authentication parameters in one definition. Create a named credential with the below details

    LabelSysTran Translator API NC
    NameSysTranTranslatorAPINC
    URLhttps://api-translate.systran.net/translation/text/translate
    Enabled for CalloutsChecked
    Generate Authorization HeaderChecked
    External CredentialSelect above created external credential – SysTran Translator API EC
    Text Translation - Named Credential in Salesforce

    3. Create a Permission set and Assign it to User

    Create a permission set named SysTran Translator PS. After creating the permission set add the above-created external credential principal in the External Credential Principal Access app.

    If the Principal is not created in the external credential section then it will not appear in the above screen.

    Now assign this permission set to the required user. As we are testing the application, add this permission set to yourself from the user page.

    4. Create a Custom Metadata Type for Langauge

    Custom metadata is customizable and deployable metadata structure. We can store metadata details that are required by the application for dynamic execution. Create a custom metadata type for storing language information.

    Metadata PropertyMetadata Property Value
    LabelTranslation Language
    API NameTranslationLanguage__mdt

    Create a custom field Language Code with the below detail.

    Field LabelLanguage Code
    Field APILanguageCode__c
    Data TypeText(5)

    Sample Records

    LabelLanguage Code
    Englishen
    Frenchfr
    Italianit
    Japaneseja

    These are sample records, you can add all language and their code in this custom metadata.

    5. Create Flow to Integrate API and Show Translation

    We are ready with the required information to integrate translation API. Let us create a Screen flow named Translator Demo with the below UI.

    Text Translation User Interface in Flow

    We will create the below actions for our requirement to translate text into the desired language.

    1. Create Record Choice Set for Language
    2. Add Screen Element
    3. Add HTTP Callout Action
    4. Get Translated Text from the response

    a. Create a Record Choice Set for Language

    Create a collection variable to get all languages from the above-created custom metadata type-TranslationLanguage__mdt. This collection variable will be used in the source and target picklist. Create a Record Choice Set variable named translationLanguage.

    Record Choice Set in Salesforce Flow
    Variable PropertyProperty value
    ObjectTranslation Language (TranslationLanguage__mdt)
    Condition RequirementsNone
    Sort OrderNot Sorted
    Choice LabelLabel
    Data TypeText
    Choice ValueLanguageCode__c

    b. Add Screen Element

    As per the screen, we will add two picklist controls for the source and target language. I have used the below values for creating it.

    PropertySource Picklist ControlTarget Picklist Control
    LabelSource LangaugeTarget Langauge
    API NamesourceLangaugetargetLangauge
    Data TypeTextText
    Let Users Select Multiple OptionsNoNo
    Component TypePicklIstPicklIst
    ChoicetranslationLanguagetranslationLanguage
    Default Value{!sourceLangauge}{!targetLangauge}

    Add two more fields for entering source text and displaying translated texts.

    Control PropertyText Area ControlDisplay Text Control
    LabelText to Translate
    API NameText_to_TranslatetranslatedMessage
    Default Value{!Text_to_Translate}Translated Text
    {!translatedText}

    c. Add HTTP Callout Action

    Add an action element on the canvas area after the above screen element. This will show the below screen.

    HTTP Callout Action in Salesforce Flow

    Create External Service with Name CallSysTranslationService. Select the above-created named credential SysTran Translator API NC in the Named credential picklist.

    HTTP Callout External Service in Salesforce Flow

    After saving external service, it will ask to configure Invocable Action. Set properties based on the below table.

    Configure Invocable Action in Salesforce
    PropertyProperty Value
    LabelCall Translator Service
    MethodGet
    URL PathAlready set in Named Credential
    Query ParametersAdd four parameters of String type with name key, source, target and input

    Add response JSON to create runtime apex class to store response data. Here is the response JSON sample.

    HTTP Action Response Wrapper class generation

    Sample Response JSON

    {
        "outputs": [
            {
                "output": "Keine Warteschlange für Route definiert"
            }
        ]
    } 

    once you review the response JSON data structure, proceed further to set parameter values and call the API. As we will get a string collection as a response from API, we have to set response data in the apex wrapper object.

    External Service Call in Screen Flow

    Set all required information to call external service. We need to set values from screen elements and this will be sent to API for processing.

    PropertyProperty Values
    LabelCall Sys Translator Service
    API NameCall_Sys_Translator_Service
    input{!Text_to_Translate}
    key70********8e( Set your API Key)
    source{!sourceLangauge}
    target{!targetLangauge}

    To store response data, click Advance->Manually assign variables->Store Output Values-> Create a response object.

    Create a response variable of the apex-defined type. Apex will be of ExternalService__CallSysTranTransalatorAPI_Callx20Translatorx20Service_OUT_2XX. This apex class will be generated from the above step when we have reviewed the response JSON. If you have put a different name for external service, this apex class name will vary. So you can search the apex class with the external service name and create the variable.

    d. Get Translated Text from the response

    Our API call is implemented in the above step. We will get a response in the Apex wrapper class which is created automatically when the response JSON is parsed. As per the response JSON, string collection will be returned so we have to iterate the complete string collection and concatenate all translated text in a string variable.

    Create a text-type variable named translatedText which will have default value {!$GlobalConstant.EmptyString}. The response will be saved in response object and our translated text collection will be in response.outputs collection. Create a loop named Get_Translated_Message that will iterate on response.outputs collection.

    Salesforce Flow Loop

    Concatenate translated text in translatedText variable. We can use the assignment element to add the iterated messages in the variable translatedText. You can also set the value as {!Get_Translated_Message.output} in translatedText variable.

    Salesforce Screen Flow Variable Assignment

    Flow Diagram

    Text Translation Salesforce Screen Flow

    6. Test the Flow

    Here is a sample video for text translation that is using above-mentioned concepts.

    References:

    SYSTRAN Translate documentation

    Salesforce Flow HttpCallout

    Related Posts

    Extract Demographic Detail using Trestle Reverse Phone API

    Automating data synchronization between Salesforce and Amazon Seller

    Verify Phone using Flow HTTP Callout

    Need Help?

    Need some kind of help in implementing this feature, connect on my LinkedIn profile Dhanik Lal Sahni.

    api integration deep learning external service external service in salesforce flow http callout machine learning prompt in salesforce flow salesforce api salesforce api integration salesforce integration interview questions text translation in salesforce text translation in salesforce apex
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleExtract Demographic Detail using Trestle Reverse Phone API
    Next Article Text translation in Salesforce Using Apex
    Dhanik Lal Sahni
    • Website
    • Facebook
    • X (Twitter)

    With over 18 years of experience in web-based application development, I specialize in Salesforce technology and its ecosystem. My journey has equipped me with expertise in a diverse range of technologies including .NET, .NET Core, MS Dynamics CRM, Azure, Oracle, and SQL Server. I am dedicated to staying at the forefront of technological advancements and continuously researching new developments in the Salesforce realm. My focus remains on leveraging technology to create innovative solutions that drive business success.

    Related Posts

    By Dhanik Lal Sahni4 Mins Read

    How to Build a Generic Modal Window in Lightning Web Component

    May 26, 2025
    By Dhanik Lal Sahni6 Mins Read

    Top 10 Salesforce Flow Features of Salesforce Summer ’25

    May 11, 2025
    By Dhanik Lal Sahni6 Mins Read

    Unlock the Power of Vibe Coding in Salesforce

    April 30, 2025
    View 2 Comments

    2 Comments

    1. Suhirdass S on November 3, 2023 3:59 pm

      Hi Team,

      In this low-code-integration-for-text-translation-using-systran-api, I am facing issue like an

      Error Occurred: Callout failed for invocable action CallSysTranslatorService.Call Translator Service. We couldn’t access the credential(s). You might not have the required permissions, or the external credential “SysTranTranslatorAPIEC” might not exist.

      I don’t know why i am getting, i tried what are the in this article.Please give me solution on this
      Thanks,
      Suhirdass S

      Reply
      • Dhanik Lal Sahni on November 7, 2023 7:47 am

        Hello Suhirdass,
        You have to give access to External Credential to user. It is mentioned in blog also that create permission set for this permission set and assign it to required user. This is good to control integration.

        Thank You,
        Dhanik

        Reply
    Leave A Reply Cancel Reply

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (111) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) file upload (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (30) Lightning web component (62) lwc (51) named credential (8) news (4) optimize apex code (4) Permission set (4) pmd (3) Queueable (9) rest api (23) S3 Server (4) salesforce (141) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Ranked #1 SALESFORCE DEVELOPER BLOG BY SALESFORCEBEN.COM
    Featured on Top Salesforce Developer Blog By ApexHours
    Recent Posts
    • How to Build a Generic Modal Window in Lightning Web Component
    • Top 10 Salesforce Flow Features of Salesforce Summer ’25
    • Unlock the Power of Vibe Coding in Salesforce
    • How to Implement Dynamic Queueable Chaining in Salesforce Apex
    • How to Implement Basic Queueable Chaining in Salesforce Apex
    Ranked in Top Salesforce Blog by feedspot.com
    RSS Recent Stories
    • How to Connect Excel to Salesforce to Manage Your Data and Metadata February 9, 2025
    • Difference Between With Security and Without Security in Apex January 2, 2025
    • Top Reasons to Love Salesforce Trailhead: A Comprehensive Guide December 5, 2024
    • How to Utilize Apex Properties in Salesforce November 3, 2024
    • How to Choose Between SOQL and SOSL Queries July 31, 2024
    Archives
    Categories
    Tags
    apex (111) apex code best practice (8) apex rest (11) apex trigger best practices (4) architecture (22) Asynchronous apex (9) AWS (5) batch apex (9) batch processing (4) code optimization (8) code review tools (3) custom metadata types (5) design principle (9) file upload (3) flow (15) future method (4) google (6) google api (4) integration (19) integration architecture (6) lighting (8) lightning (64) lightning-combobox (5) lightning-datatable (10) lightning component (30) Lightning web component (62) lwc (51) named credential (8) news (4) optimize apex code (4) Permission set (4) pmd (3) Queueable (9) rest api (23) S3 Server (4) salesforce (141) salesforce apex (46) salesforce api (4) salesforce api integration (5) Salesforce Interview Question (4) salesforce news (5) salesforce question (5) solid (6) tooling api (5) Winter 20 (8)

    Get our newsletter

    Want the latest from our blog straight to your inbox? Chucks us your detail and get mail when new post is published.
    * indicates required

    Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn Reddit Telegram
    © 2025 SalesforceCodex.com. Designed by Vagmine Cloud Solution.

    Type above and press Enter to search. Press Esc to cancel.

    Ad Blocker Enabled!
    Ad Blocker Enabled!
    Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.