Transform NLP Action Results Action

Transform an AI Natural Language Processing (NLP) result created by using Einstein Generative AI into an Apex Object record.

This action is available in API version 61.0 and later.

To access the Transform NLP Action Results action, you must have the Salesforce Feedback Management Starter or Growth License and the Salesforce org enabled with Surveys along with Generative AI Surveys feature.

Supported REST HTTP Methods

URI: /services/data/vXX.X/actions/standard/transformNlpActionResult

Where XX.X is the latest API version.

Get the list of invocable actions for each available survey.

Formats: JSON, XML

HTTP Methods: POST

Authentication: Authorization: Bearer TOKEN

Where TOKEN is a variable.

Inputs

Input Type Description
nlpRecordId String Required. ID of the AI natural language process result (type AiNaturalLangProcessRslt) record to perform natural language processing on.
feature String Required. Purpose that the NLP response is used for: SurveyLongSummarization or SurveyShortSummarization.

Outputs

Output Type Description
nlpResponse string Apex industries NLP response record that contains the action output.
status string Status of the NLP operation: completed, failure, notStarted, or pending.

Example

POST

This example shows a sample request for the Transform NLP Action Result action.

{
  "inputs": [
    {
      "nlpRecordId": "7NPSM0000000K5B4xx",
      "feature": "SurveyLongSummarization"
    }
  ]
}

This example shows a sample response for the Transform NLP Action Result action.


  {
    "nlpResponse": {
      "summarizationResult": {
        "summary": "The majority of respondents found the process cumbersome and experienced issues with the payment web page. There were no specific suggestions provided for improving the product."
      },
      "status": "completed"
    }
  }