Loading
Salesforce Feedback Management
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create a Flow to Activate Natural Language Processing Services

          Create a Flow to Activate Natural Language Processing Services

          Create a flow in Flow Builder to activate Natural Language Processing Services and analyze text-based survey responses. This flow will invoke Natural Language Processing (NLP) actions when a survey is submitted.

          Note
          Note Unauthenticated guest users can't run the flow to invoke natural-language processing (NLP) services.
          1. From Setup, in the Quick Find box, enter Flows, and then select Flows.
          2. Click New Flow, and select Record-Triggered Flow. Then click Create. Flow Builder launches.
          3. Click Edit.
          4. Select the object whose records trigger the flow when they’re created, updated, or deleted. Here, select the SurveyQuestionResponse object.
          5. Select when to trigger the flow. Here, select A record is created.
          6. Next, add the element.
            1. Click the Toggle Toolbox.
            2. Click New Resource.
            3. Select Variable as the Resource Type.
            4. Enter an API name and description for the entity extraction.
            5. Select Apex-Defined as the Data Type.
            6. Select nlpservice_ServiceDetail as the Apex Class.
            7. Specify the availability outside the flow. Here, select Available for Input option.
            8. Click Done.
          7. Similarly, create these variables:
            Variables Data Type Apex Class
            Keyphrase Extraction Apex-Defined nlpservice_ServiceDetail
            Targeted Sentiment Apex-Defined nlpservice_ServiceDetail
            Service List Apex-Defined nlpservice_ServiceDetailsList
          8. Next, add a new element.
            1. Select Assignment.
            2. Click Edit Element.
            3. Select the Entity Extraction and configurationAPIName as variables.
            4. Select the operator as Equals.
            5. Select the value as AWS_Enity_Extraction.
          9. Similarly, create these assignments:
            Variables Operator Value
            Entity Extraction and serviceName Equals Amazon_Comprehend_Entity_Extraction
            ServiceList and serviceDetails Add EntityExtraction
            Keyphrase Extraction and configurationAPIName Equals AWS_Keyphrase_Extraction
            Keyphrase Extraction and serviceName Equals Amazon_Comprehend_Keyphrase_Extraction
            ServiceList and serviceDetails Add KeyPhraseExtraction
            Targeted Sentiment and configurationAPIName Equals AWS_Targeted_Sentiment
            Targeted Sentiment and serviceName Equals Amazon_Comprehend_Targeted_Sentiment
            ServiceList and serviceDetails Add TargetedSentiment
          10. In the flow, click Action.
            1. Click Industries Generative AI.
            2. Select Initiate Natural Language Processing as the action.
            3. Enter a label, API name and description.
            4. Select {!$Record.Id} as the Reference Record ID. (Reference Record ID> ID> SurveyQuestionResponse).
            5. Select {!ServiceList} as Service Details List.
            6. Select the Text Field value as SurveyQuestionResponse.ResponseValue.
            7. Click Done.
          11. Save and activate the flow.

          The flow uses the Initiate Natural Language Processing action to call the Amazon Comprehend API, which analyzes survey responses and creates or updates records with insights about the responses.

           
          Loading
          Salesforce Help | Article