Unlocking the Power of Typeahead Lookup Mode in OmniScript

Salesforce OmniScript offers a powerful way to streamline user interactions. One of its standout features is Typeahead Lookup Mode, which allows users to dynamically search and select records from Salesforce with ease. This feature enhances usability, improves data accuracy, and can be applied to various objects like Contacts, Accounts, or custom objects.

In this blog, we’ll walk through how to use Typeahead Lookup Mode in OmniScript to filter and display records dynamically, turning complex scenarios into simple, intuitive experiences.

1. Configure the Data Source

OmniScript relies on DataRaptors or Integration Procedures to fetch data dynamically. Follow these steps to set it up:

  • Create a DataRaptor Extract:
  1. Navigate to OmniStudio DataRaptors in Salesforce.

  2. Create a new DataRaptor Extract, selecting the object (e.g., Contact) and the fields you need (e.g., Id and Name).

  3. Add filters, such as AccountId = %AccountId%, to refine your results.

  4. Save and test the DataRaptor.

2. Add a Typeahead Lookup in OmniScript

Once your DataRaptor is set up, configure the Typeahead Lookup in OmniScript:

Drag and Drop:

  1. Open OmniScript Designer.

  2. Drag and drop the Typeahead Block into the OmniScript canvas.

  3. Drag the DataRaptor Extract into the Typeahead Block to connect your data source.

Configure the Typeahead Properties:

  1. Set the Typeahead Mode to Lookup Mode

  2. Specify the Typeahead Key (e.g., ContactName) – this will be the field displayed for the user to search.

  3. In the Data Source and Filter Values, pass the relevant filter (e.g., ContextId) to narrow the results based on related records (e.g., filtering Contacts by Account).

Step 3: Testing and Validation

  1. Deploy the OmniScript.

  2. Test the Typeahead Lookup by typing into the field. Ensure it dynamically queries and displays results (e.g., Contact Names) based on the filter.

  3. Confirm that the selected value is stored and used in subsequent steps or saved as required.

By leveraging Typeahead Lookup Mode in OmniScript, you can create dynamic, intuitive user experiences with real-time data filtering. This feature simplifies complex data selection tasks, ensuring users can quickly find and select the records they need.