Get Records Tool with Custom Entity

Updated 

The Get Records Tool allows you to retrieve data from custom entities using defined filters and store the results in variables. It also offers sorting options to organize the extracted data in a structured and meaningful way.

Steps to Add a Get Records Tool with Custom Entity

Follow the steps below to configure the Get Records Tool in AI Agent Studio:

1. Access the Get Records Tool

  • Navigate to AI Agent Studio from the Sprinklr Launchpad.

  • Select the AI Agent you want to configure.

  • Expand the Build section and open Tools.

  • Click + Add Tool and select Get Records Tool from the list.

2. Define Basic Details

  • Name: Enter a unique name to identify the tool.

  • Description: Provide a brief description of the tool’s purpose.

3. Configure Setup Function

  • Under Setup Function, select Custom Entity in the Select Data Type field.

  • Under Custom Entity, select the Custom Entity containing the required records to be fetched.

  • Use Filter Records to define the field, operator, and value criteria for filtering records.

    • For more dynamic filtering, use Query Fields with the same field as in Filter Records. Set the Required option to Yes or No; when enabled, GenAI will automatically prompt the user for the value during the conversation.

  • Define the Output Variable, which stores the value retrieved from the record.

  • In the Output Adapter field, you can write a Groovy script or use the Custom Code option to apply additional filtering logic. This script runs in the background on top of the retrieved records for further refinement.

Note: If this field is left null, the output will be returned as fetched, without any modifications.

Note: Data Table and Profile List options are no longer available in the Setup function.

Click Save in the bottom right corner to save your Tool.