Dynamic Context Variable Reference
Last updated: July 22, 2026
Dynamic Context variables define which visitor fields a Marketing Agent can use and what each value means during a conversation.
Where Variables Are Configured
Open Marketing Agent Configuration, select the agent, open the Agent tab, and expand Dynamic Context Ingestion.

Each variable has two parts:
Field | Purpose |
|---|---|
Variable | The exact key sent through |
Description | The instruction explaining what the value means and how the agent should use it. |
Supported Values
The JavaScript API accepts these flat values:
Type | Example |
|---|---|
String |
|
Number |
|
Boolean |
|
Null |
|
Nested objects, arrays, files, functions, dates, and undefined values are rejected.
URL parameters are always ingested as strings. For example, ctx_employeeCount=500 produces the string value "500".
Naming Guidelines

Match names exactly between Docket and your website code.
Treat capitalization as significant.
Use stable names such as
name,company_name,plan, oris_customer.Avoid spaces and punctuation that complicate JavaScript and URL usage.
Do not encode secrets or sensitive details in a variable name.
Do not rename a production variable without updating every website implementation that sends it.
Description Guidelines
A useful description identifies the value and limits how the agent should use it.
Variable | Recommended description |
|---|---|
| This is the visitor's first name. Use it for a natural greeting, but do not repeat it unnecessarily. |
| This is the visitor's company. Use it to make examples relevant to their organization. |
| This is the visitor's current plan. Use it only when answering plan-specific questions. |
| This indicates whether the visitor is an existing customer. Do not ask them to qualify as a new prospect when the value is true. |
| This is the visitor's operating region. Use it when regional availability or routing is relevant. |
Avoid descriptions such as "company" or "use this value." They do not tell the agent when or how to apply the field.
JavaScript and URL Mapping
await window.AISeller.setContext({
company_name: "Northstar Labs",
plan: "Enterprise",
is_customer: true
});The equivalent URL keys use the ctx_ prefix:
?ctx_company_name=Northstar%20Labs&ctx_plan=Enterprise&ctx_is_customer=trueThe prefix is removed before the key is matched. URL values remain strings, so ctx_is_customer=true is the string "true", not a boolean.
Verify a Variable
Set a documentation-only value before starting a conversation.
Confirm
setContext()returnssuccess: true.Start a new conversation.
Ask a question that should use the field.
Confirm the agent follows the variable description without exposing unrelated context.