All docs

How to build agent scripts in VICIdial

VICIdial scripts give agents canned responses, dynamic data, and per-lead customization.

VICIdial scripts pop into the agent's screen during a call. They can be static text, dynamic with lead variables, or HTML with full styling.

Create a script

Admin → Scripts → Add a New Script:

  • Script ID: short name (alphanumeric + underscores)
  • Script Name: human-readable
  • Script Color: header color in agent screen
  • Script Text: the actual script content

Script syntax

VICIdial substitutes lead variables wrapped in --A--:

Hi --A--first_name--B--, this is --A--user_name--B-- calling from
--A--campaign_name--B--. I'm calling about --A--vendor_lead_code--B--.

Available variables: anything in vicidial_list columns + a few special ones (user_name, campaign_name, etc.)

HTML scripts

Set Script as URL = Y in the campaign config + point at a custom PHP/HTML page on your server. Agents see your full custom page.

Useful for:

  • Dynamic CRM lookups (call your CRM API, render the lead's history)
  • Multi-page scripts with branch logic
  • Embedded forms for collecting structured data

Per-campaign vs per-list assignment

Scripts can attach at:

  • Campaign level (every list in the campaign uses it)
  • List level (overrides campaign default)

List-level is useful for A/B testing different scripts on different lead segments.

Hot keys + scripts

Hot keys can update script state — e.g. press 2 to advance to the rebuttal section. Configure the hot key with Action = "Update Script."

Common patterns

Cold call open

Hi --A--first_name--B--, this is --A--user_full_name--B-- with [Company].
Did I catch you at a bad time?

[If "yes"] No problem - when's a better time to reach you?
[If "no"] Great, the reason I'm calling...

Verification + close

Build separate scripts for fronter / closer / verification stages.

Related