Assign specific parameters to an agent - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

Parameters can be assigned to a given agent by adding the "@Agentname"suffix to the parameter name.

Example

afs:sort@Agentname=afs:relevance,DESC

A parameter assigned to a specific agent (or specific scope parameter) will act independently from the same parameter that has not been assigned (or global scope parameter). In other words, within a given request, a specific scope parameter will only act on the called agent, whereas the global scope parameter will exclude this specific agent and act on all others.

The agent name must include an uppercase letter, except for AFS predefined agents (spellcheck, concept).

All parameters, except afs:service, afs:status and afs:feed, can be overridden for each agent. The order of parameters does not matter.

Use case

A user wants to launch a query with a set of parameters. Within the query, the user wants to add a specific parameter for a specific agent. More often than not, the user will do the following thing:

afs:filter=price<42&afs:filter=category="science-fiction"&afs:filter@Agentname=author="Adams"

Where

  • Price and Category filters will be assigned to all agents BUT @Agentname
  • Author filter will be assigned ONLY to @Agentname

In order to assign Price and Category filters to all agents INCLUDING @Agentname, AND also assign Author filter to @Agentname, the user must do the following:

afs:filter=price<42&afs:filter=category="science-fiction"&afs:filter@Agentname=price<42&afs:filter@Agentname=category="science-fiction"&afs:filter@Agentname=author="Adams"

Where

  • Price and Category filters will be assigned to all agents AND to @Agentname
  • Author filter will be assigned ONLY to @Agentname