Agents¶
An agent is one of your org's conversational programs, such as a sales agent or a customer-care agent, and the unit that Offer Manager scopes its decisions to. In the API, an agent is an application. This page describes what belongs to an agent, what is shared across agents, and how an agent's requests are tied to it. For the objects themselves, see Moments, offers, and rules.
One agent serves every channel it talks on. Each request names its channel, so the same agent's moments and rules apply on RCS, SMS, Messenger, and webchat.
What belongs to an agent¶
The following belong to exactly one agent, chosen when they are created:
| Object | What scoping means |
|---|---|
| Moments | A moment's Code is unique within its agent, so two agents can each have an after-check-in moment. A moment can't move to another agent. |
| Rules | A rule's moments all belong to the rule's agent. A rule can't move to another agent. |
| Attribute catalog | Each agent has its own list of the attributes it sends, so two agents can send the same key with different meanings. A rule's conditions can use only its own agent's attributes. |
| Customer history | Each customer's accepts, declines, and offer views are kept per agent. A decline in the sales agent doesn't exclude the customer from the care agent's rules. See Record accepts and declines. |
| Default moment | A request that names no moment serves into its agent's default moment. |
Offers belong to the org, not to an agent. Any agent's rules can show the same offer, so a brand can run one upgrade offer in both its sales and care agents. The rule that places the offer is what differs between them.
Reports and the copilot work across the org, since a marketer usually works across all of its agents.
Choose an agent in the console¶
The Moments, Rules, and Attributes pages show one agent at a time, or all of them. Choose with the Agent picker at the top of each page. All agents lists every agent's records, and each row names its agent. The Offers page has no picker, because offers are shared.
When you create a moment or a rule, the Agent field starts on the agent you picked. You can't change it after the record is saved.
How a request reaches its agent¶
Every request to the Fetch API resolves to one agent before anything else happens:
- A fetch key is bound to one agent. A request with a fetch key is for that agent. Each agent gets a fetch key when it is created.
- A key from the console's API Keys page belongs to the whole org. A
request with one names its agent in the
applicationparameter.
The moment code in the request is then looked up within that agent. A code the agent doesn't have returns an error, even if another agent has it. See How the application and moment are resolved.
The team that runs the agent uses the same key to register its attributes for the agent.
Add an agent¶
Your org starts with one agent. To run more than one, such as separate sales and care agents, add one in the console. You need the editor role or above.
- On the Moments, Rules, or Attributes page, click New agent beside the Agent picker.
- In Name, enter a name your team recognizes, because the console, rule descriptions, and the copilot use it.
- Optional: in Description, say what the agent does.
- Click Add agent. The picker switches to the new agent.
You can also add an agent through the application collection of the
Offer Manager API.
What's next¶
- Create a moment for an agent.
- Describe an agent's attributes so rules can use them.
- Read the scoping rules in Application scoping.