ruLog in to Senler

Agent Variables

Summary

In the agent form, you can enable project variables and lead variables, then limit reading and writing separately for each request source.

Project Variables

  • permanent project data;
  • examples: tariffs, links, rules, contacts, addresses, promotional codes, legal conditions.

Lead Variables

  • specific client data;
  • examples: name, city, segment, order status, interest, latest product, next contact date.

Private and group dialogs

In a private dialog, reads and writes apply to the current lead. A group chat or publication comments can contain several participants, so the agent selects a specific lead from the message author, message reply, and current conversation context.

To read or change a particular participant's data, name them or reply to their message. The agent works only with a lead who actually participated in that dialog. If the participant cannot be identified unambiguously, data must not be changed until the person is clarified.

Project variables do not depend on the participant and remain shared across the project.

Inserting variables into instructions

In the agent instruction editor, the variables button opens project and lead data. Find the required variable and select how to insert it:

  • Value — insert the value directly into the instruction text;
  • Condition — use one fragment when the value is filled and another when it is missing. The missing-value branch can be left empty.

Inserting a variable into instructions does not grant access automatically. Configure read or write access for that variable type below and publish the agent.

For each type of variable, you can configure access

  • no access;
  • read only;
  • reading and writing.

Access comes from two sources

  • enable project variables, then configure separate instruction access and client request access;
  • enable lead variables, then configure separate instruction access and client request access.
Access comes from two sources. Step 1: 1. Tools
1 / 7
1. Tools

What the two access sources mean

Instruction access applies when the agent reads or saves data while following a predefined rule, without a separate client request to use a variable. For example, an instruction such as "save the client's city after it is clarified" requires write access to lead variables from instructions.

Client request access applies when the person explicitly requests that data be shown or changed. "What is my order status?" requires read access to lead variables from client requests, while "Change my city to London" requires write access from client requests.

Configure these sources separately and grant only the minimum required access. Write permission allows a change, but it is not a command to modify data without a matching rule or explicit request.

Why a variable was not changed

Check these conditions in order:

  1. The required variable type is enabled in the agent draft.
  2. The variable definition exists under Settings -> Variables.
  3. The relevant request source has Read and write, not Read only.
  4. In a group chat or comments, the intended participant is identified unambiguously.
  5. The agent changes are saved and published, and the live dialog uses the new version.

If the participant or write permission is ambiguous, the safe result is to leave the value unchanged and explain what needs clarification.

If the agent needs to remember customer details

  • enable lead variables;
  • give the agent write access;
  • create definitions of lead variables in “Settings” -> “Variables”;
  • write in the instructions what data needs to be saved and when.

If the agent needs to insert persistent company data

  • create a project variable;
  • enable project variables in the agent;
  • give read access;
  • explain in the instructions how to use the value.

Where this is in the interface

Main elements in this section:

  • agent settings form
  • agent list
  • Agents item in the side menu