Skip to navigation

Resolver Strategies

View as Markdown

What are resolver strategies?

Resolver strategies instruct AI agents how to convert the user’s provided value (e.g. “this week’s most important bug”) to a Data Type the system wants (e.g. <JiraIssue>_BUG-732).

Resolver strategies are how you configure slot resolvers, the Plugin part that turns what a user says into a real record.

How slot resolvers work

LLMs hallucinate. When a user says “Jamie” and there are 12 Jamies in your directory, the LLM picks the most probable one, which may not be the right one. One wrong ID passed to ServiceNow means the wrong person loses access. Slot resolvers exist to make this impossible.

The way users reference your business objects seldom matches how business systems store them. For example:

  • “Tomorrow’s Standup” is a GoogleCalendarEvent with ID = 4s567d8s908f87654sa678ds
  • “Jamie” is a User with ID = 9e107d9d-372b-4ac9-b4e9-0fbccd3029ab

A slot resolver works in three stages:

  1. Candidate retrieval. The AI agent retrieves possible values that satisfy the constraints of your slot, using the methods in the slot’s resolver strategy (see Methods below).

  2. Disambiguation. When the AI agent finds multiple possible matches, it presents them (with citations) so the user can pick the right one.

  3. Stable memory. Slot resolvers use a symbolic working memory to track both the list of possible values and the selected value, so the AI agent won’t change an ID or make up a new one when it passes the value to your actions.

Plugins built with slot resolvers perform substantially better in production. Why Plugins shows where slot resolvers fit alongside Policy Validators and the Action Orchestrator.

Looking for a complete worked example? Quickstart #2: Slots & Resolvers walks through building a feature_request Data Type with a dynamic resolver end-to-end, including the HTTP action, the resolver configuration, output mapping, cardinality, and using the resolved object in a conversational process.

One strategy, one data type

Each resolver strategy produces one data type. For example, if I have a resolver strategy that is bound to the JiraIssue data type, then it can NOT also return an AsanaTask

Methods

Resolver strategies are made up of multiple “methods.” Each method provides a list of possible values that matches the data type.

Resolver strategy limitation

A resolver strategy can only have 1 static method or multiple dynamic methods.

It is not possible to have multiple static methods or a mix of static and dynamic methods. If this is something you think you need, reach out to your CSE or support@moveworks.ai!

Types of methods

You can build two types of methods:

  1. Static methods - preconfigure a multiple choice list of possible values. For example, if you’re changing the status of a JiraIssue, you might specify a few status options
    • Not Started (id=4)
    • In Progress (id=8)
    • Done (id=10) The AI agent will offer these options as part of how slot resolvers work.
  2. Dynamic methods - use an action to retrieve possible values. For example, if you’re trying to get a list of JiraIssue records that are assigned to the user, you can fetch them from the Jira Issues API and offer them to the user. You can send data from your conversational process into the method with Strategy Mapping.

    🚧 Warning

    Use an HTTP action. Script and built-in actions are also available, but compound actions aren’t recommended.

Dynamic resolver methods do not support pagination. The action must return the complete list of candidates in a single response. If your source system returns large datasets, apply filtering at the HTTP action level (query parameters, request body filters) before the data reaches the resolver.

Output cardinality

For a given resolver, the action, after output mappings are applied, should return an instance of your data type.

For example, a resolver strategy for JiraIssue might return

  • A singleJiraIssue record - for example, if the user specified the issue by it’s ID (e.g. “I want to close BUG-732”), then you can return the content as
    {
    "id": "BUG-732",
    "title": "Set HTTP Status code correctly on custom REST API",
    ...
    }

If you always retrieve a single object in your output and want the entire object select the below setting: Interpret output as the exact value.


  • A list ofJiraIssue records, for example, if the user said “Show me my tasks,” you would return a list of records. (Note: you can return 0, or 1 records, but it must be a list).
    [
    {
    "id": "BUG-732",
    "title": "Set HTTP Status code correctly on custom REST API",
    ...
    },
    {
    "id": "BUG-733",
    "title": "Envelope response under 'data' keyword",
    ...
    },
    ...
    ]

If you always retrieve a list in your output and want the user to make a selection from the list choose the below setting:Interpret output as a list of candidate values.

Method selection

During the conversation, the AI agent picks the best method to use based on the conversation. For example, if you the following methods

  • Get JiraIssue by ID
  • Get JiraIssue assigned to user
  • Get JiraIssue by status & project

Then the AI agent will choose the right method based on the conversation

Example UtteranceResolver Strategy Method Selected
”Can you please update the due date of BUG-732 to next week”Get JiraIssue by ID
”I need to update the due date of my tasks”Get JiraIssue assigned to user
”I’m preparing for a stand-up. Can we update the due date of in progress tasks for Project Orion?”Get JiraIssue by status & project

How the AI agent runs a method

Each lookup runs exactly one method. When a strategy has several dynamic methods, the AI agent picks one from the conversation, collects that method’s input arguments, and calls its action.

A strategy with a single method runs as soon as the AI agent reaches the slot, without asking the user anything first, when that method has no input arguments left to collect. That’s always true of a static method. It’s also true of a dynamic method whose inputs all come from Strategy Mapping.

What happens with zero, one or many candidates

After a method runs, the number of candidates decides what the user sees:

Candidates returnedResult
NoneThe slot stays unfilled.
OneThe AI agent selects it without asking, then runs the slot’s validation policy on it.
More than oneThe AI agent shows the candidates and asks the user to pick one.

If the action returns an error, the method produces no candidates and the slot stays unfilled.

How do I configure resolver strategies?

Where to configure resolvers

You can attach resolver strategies in two places:

Configure the resolver strategy directly on a custom data type. Every slot that uses that data type automatically inherits the resolver. This is ideal when multiple plugins need to resolve the same business object (e.g., a JiraIssue or SalesforceAccount).

A data type’s resolver strategy can have multiple methods. For example, a JiraIssue type might have:

  • “Search by issue key” (user says “BUG-732”)
  • “Search by title” (user says “the login bug”)
  • “Search by assignee” (user says “my open tickets”)

The AI agent selects the best method based on conversation context.

Inline on a slot

Configure the resolver strategy directly on a specific slot. This is useful for one-off resolvers that are specific to a single plugin and don’t need to be reused.

Which should I use?

ScenarioRecommended Location
Business object used across multiple pluginsData type
One-off lookup specific to a single pluginInline on the slot
Need to override a data type’s default resolver for a specific slotInline on the slot

If a slot has an inline resolver AND its data type has a resolver, the inline resolver takes precedence for that slot.

The two resolvers aren’t merged: when the slot names its own resolver strategy, the AI agent uses only that strategy’s methods. When the slot doesn’t name one, the AI agent uses the data type’s resolver strategy, and the slot’s Strategy Mapping still applies to it.

Method name and type

Each method card starts with Method Name and Method Type. Give the method a detailed Method Name: the AI Assistant uses it to choose the best method for each conversation. The Method Name must be in snake_case format: letters, digits and underscores, starting with a letter or underscore, up to 64 characters.

Configuring a static resolver

Static Resolvers allow you to configure a list of options to show the user every time. Each option has a Display Value (what the end user will see) and a Raw Value (what will be used in your Activities). Select Add option to add a row.

A static method needs at least one option, and both the Display Value and the Raw Value are required. A static method must be the only method in its resolver strategy: after you add one, you can’t add another method.

A static method named reading_shelves with three options: Want to read maps to want-to-read, Currently reading maps to currently-reading, and Already read maps to already-read.

Configuring a dynamic resolver

Dynamic resolvers require you to select an action in order to dynamically look up slot values.

Selecting an action

Use an HTTP action. Script and built-in actions are also available, but compound actions aren’t recommended.

A dynamic method named search_titles that calls the search_open_library_books action, with the Input Mapping query: data.title_search.

Method input arguments

Select Input Args on the method card to define the method’s input arguments as a JSON schema in Input Schema. Inputs are added to the resolver method’s data bank. For example, the following schema provides a single title_search string as data.title_search. When the resolver slot is collected, the AI agent fills each input argument from the conversation, asking the user when it needs to.

The names of these are important as that is how the reasoning engine infers what it is collecting from the user similarly to slots in a conversational process. Do not create additional slots in your conversational process for resolver input arguments, treat the input arguments as if they are slots contained within the resolver itself.

{
"type": "object",
"properties": {
"title_search": {
"type": "string",
"description": "Words the user gave to find a book, such as part of a title or an author"
}
},
"required": ["title_search"]
}
The Input Arguments panel with an Input Schema that defines a required title_search string.

Learn more about how to write JSON schemas at the official JSON schema docs.

Input mapping

Input Mapping is a data mapper that fills the selected action’s input arguments from the method’s data bank. In this example the action’s argument is query and the method’s input argument is title_search:

query: data.title_search

The left side names the action’s argument. The right side reads the method’s data bank.

Context passing into dynamic resolvers

A dynamic resolver cannot read the conversational process data bank. To use a value from an earlier slot or activity, pass it through two mappings:

  1. On the slot, use Strategy Mapping to copy the process value into the resolver:

    building_sys_ids: data.eligible_building_sys_ids

    This creates data.building_sys_ids inside the resolver.

  2. In the resolver method, use Input Mapping to pass the local value to the action argument:

    building_sys_ids: data.building_sys_ids

The source slot must be collected or the source activity must finish before the resolver runs. Otherwise, Strategy Mapping passes a null or empty value.

Do not add a context-passed key to the resolver’s Input Arguments. Input arguments are for values the assistant should collect or infer while resolving the slot.

Follow the Strategy Mapping walkthrough for the complete building example, screenshots, testing steps, and troubleshooting.

Output mapping

This represents the output structure of your resolver method. By default, it will capture all of the data that the action you selected returns. However, you can “dot walk” into the object if you want to limit the data returned.

The output value from the http action in the resolver is stored as response when referencing it in the output mapper

Select Switch to data mapper to open a data mapper editor where you can fully define a custom output object. Select Switch to simple mode to go back to the dot-walk field.

Note: the output mapper must always point to an array if the output cardinality is set to Interpret output as a list of candidate values. This is how we build the list of option the user can select from

For example given an action with an output like

{
"hasErrors": false,
"results": [
{
"referenceId": "ref1",
"id": "0015g00000N1ABC",
"success": true,
"errors": [],
"fields": {
"Name": "Acme Corporation",
"Industry": "Technology",
"BillingCity": "San Francisco",
"Phone": "+1-415-555-1234",
"Website": "https://www.acme.com"
}
},
{
"referenceId": "ref2",
"id": "0035g00000M9XYZ",
"success": true,
"errors": [],
"fields": {
"FirstName": "John",
"LastName": "Doe",
"Title": "CTO",
"Email": "john.doe@example.com",
"Phone": "+1-415-555-1111"
}
}
]
}

The output mapping would be response.results

Set the output cardinality

See the Output Cardinality reference for guidance on which option to choose.

The Output Cardinality setting set to Interpret output as a list of candidate values.

Data bank inside dynamic resolvers

data.<input_arg>

Resolver methods reference local inputs as data.<input_arg>. Input arguments add values the assistant collects or infers. Strategy Mapping adds values from the conversational process.

meta_info.user

You can reference user attributes about the current user (ie. the user that triggered the plugin) with the notation meta_info.user

See User Attributes Reference for examples.

Which names each resolver mapper can reference

Each resolver mapper sees a different set of names under data., so the same expression can point at different values depending on where you write it.

MapperWhere you set itdata. holdsAlso available
Strategy MappingOn the slotThe conversational process data bank: earlier slots and activity outputsmeta_info.user
Input MappingOn the resolver methodThe method’s inputs: input arguments plus Strategy Mapping keysmeta_info.user
Output MappingOn the resolver methodThe method’s inputs, as in Input Mappingresponse (the action output), meta_info.user
Slot Validation PolicyOn the slotThe conversational process data bankvalue (the slot value being checked), meta_info.user

If a Strategy Mapping key and an input argument have the same name, the Strategy Mapping value wins.

How to reference the output of resolvers

Static resolvers

Once the user selects one of the presented static options you can reference the output in the conversational process in 2 ways.

To reference the display value of the user’s static resolver choice use:

data.<slot_name>.display_name

To reference the raw value of the user’s static resolver choice use:

data.<slot_name>.value

Dynamic resolvers

Once the user selects one of the presented dynamic options, the entire object is bound to the slot. Reference it directly — there is no .value. indirection like there is on static resolvers.

To reference the whole selected object:

data.<slot_name>

To reference a field on the selected object:

data.<slot_name>.<field_name>

For example, given a slot named feature_request resolved by a dynamic resolver whose action returns objects with id, name, and current_status fields:

ReferenceReturns
data.feature_requestThe full feature request object
data.feature_request.id"FR-12345"
data.feature_request.name"Add Dark Mode"
data.feature_request.current_status"New"

Do not write data.feature_request.value.current_status for dynamic resolvers — that pattern only applies to static resolvers (see above). On a dynamic resolver, fields hang directly off the slot name.

Referencing slot values by slot type

Whether you add .value depends on how the slot is resolved, not on its data type. Use these forms in activity input mappings, such as the query parameters or body of an HTTP action, and in the slot’s validation policy.

SlotReferenceExample
No resolver (string, boolean, number and other built-in types)data.<slot_name>data.is_virtual
Static resolverdata.<slot_name>.value for the raw value, data.<slot_name>.display_name for the display valuedata.priority.value
Dynamic resolverdata.<slot_name> for the object, data.<slot_name>.<field_name> for a fielddata.feature_request.id
List slotdata.<slot_name>[<index>] for one item, starting at 0data.attendees[0]

In a validation policy, value is the slot value being checked; data.<slot_name> is a slot that’s already been collected.

What “Cannot access list element using non-integer key” means

This error means an expression reads a field from a list as if it were a single object, for example data.records.Id when records is a list. Pick an item by its position first, such as data.records[0].Id.

For how resolver strategies fit into slot configuration, see Slots.

For a complete end-to-end walkthrough — creating a custom Data Type, configuring a dynamic resolver against an HTTP action, mapping the output, and using the resolved object in a conversational process — see Quickstart #2: Slots & Resolvers.