Applies to: Agencies building reusable agents, workflows and snapshots
How do I use global variables so one agent or snapshot works for every client?
Global variables are placeholders for anything that changes from client to client, such as the company name, AI agent name, business phone number, email address, address, business hours, website URL, a Google review link, custom FAQs, the email signature, the email address messages are sent from and the phone number SMS is sent from. You use the variable in agent prompts, workflows, email steps and SMS steps instead of typing the real value, so the same template works for every client without editing it.
Most built-in variables relate to your own system (with some exceptions, such as the sub-account name), so for snapshots you create your own variables for client details.
- Go to Settings, then Global variables, and click Add variable. Give it a name and a value, for example business hours with the value 9AM to 6PM. Create as many as you need; at a minimum company name, company website, business phone number and business email. You can add variables later, and change a value by clicking edit on the variable.
- In your agent prompt, workflow messages, emails and SMS, remove the hard-coded text and insert the variable instead. Type a forward slash or click the plus button to open the variable picker, choose global variables and pick the variable. For example the prompt reads "You are [AI name], the AI receptionist for [company name]". The picker shows the example value currently set.
- When you create the snapshot, include the global variables the agent uses along with the agent. If you add variables after creating the snapshot, update the snapshot so it carries them.
- After the snapshot is in a sub-account, log in to that sub-account (Log in as from the Sub-accounts page), go to Settings, then Global variables, and enter that client's values, for example ABC Roofing as the company name.
When a value is set, everything that uses the variable in that account (every agent, workflow, email and SMS) updates at once, so you never edit the agent or each message for a new client. Global variables can also set the sender identity: choose which phone number sends SMS and which email account sends emails, and every step that uses that variable sends from it.
Make collecting these values part of client onboarding: ask each new client for their business hours, company name, phone number and the rest. The snapshot (the template) plus the variables (the values) lets you build once and sell over and over.