VICIfast
Operations

How to pass preset date constants to a custom report link

VICIdial Preset Constants let you attach a variable name and value to a custom report link so the report opens with specific parameters already set, saving users time on repeat lookups.

VICIfast Support
··4 min read
How to pass preset date constants to a custom report link

Custom report links in VICIdial can do more than point to a report URL. Through Preset Constants, each custom report link can carry one or more variable name and value pairs that are appended to the URL when a user clicks the link. The report receives those variables automatically, so it opens pre-filtered — a date range already selected, a Campaign already chosen, a Status (lead status) code already applied. For any report that a team runs repeatedly with the same parameters, this removes several manual steps every time someone needs the data.

What preset constants are

A Preset Constant is a pair: a Variable Name and a Value. The Variable Name is the name of the parameter the report script expects — for example, `query_date` or `campaign_id`. VICIdial allows alphanumeric characters and underscores in variable names. Brackets are also accepted in a limited way: if the report expects an array, you can suffix the name with `[]` (for example, `status[]`). The system removes any characters inside brackets and also removes unmatched brackets, so the format needs to be clean before you save. The Value side can be either a pre-defined date constant or a custom string you type in yourself.

Pre-defined values and custom values

VICIdial ships with a set of pre-defined values you can select from a dropdown. All of them except two are dates in `yyyy-mm-dd` format. The available pre-defined values are: `today` (today's date), `yesterday` (yesterday's date), `datetime` (a timestamp in `yyyy-mm-dd hh:ii:ss` format), `filedatetime` (an all-numeric timestamp in `yyyymmddhhiiss` format), and `6days`, `7days`, `8days`, `13days`, `14days`, `15days`, and `30days` — each representing the date that many days ago. These are resolved at the moment the link is clicked, so `yesterday` is always the previous calendar day, not the day the preset was created.

If none of the pre-defined values match what you need, set the Value dropdown to `Custom Value` and fill in your own string in the field that appears to the right. This lets you hard-code a specific Lead list ID, a fixed Disposition code, or any other static parameter the report accepts. Custom values are URL-encoded before being stored in the database, so special characters are handled correctly.

How to add a preset constant

  1. Open Custom Reports Admin and open the report entry you want to configure (or create a new one).
  2. Scroll to the Preset Constants section.
  3. Enter the Variable Name in the Variable Name field. Use the exact parameter name your report script expects.
  4. Choose a pre-defined Value from the dropdown, or select 'Custom Value' and type your own string in the adjacent field.
  5. Click ADD. The variable name and value pair appears in the Current Constants list below.
  6. Repeat for any additional parameters the report needs.
  7. To remove a constant, click REMOVE next to it in the Current Constants list. Constants are not editable in place — remove and re-add if you need to change a value.

How the constants flow to the report

flowchart LR
  A[User clicks custom report link] --> B[VICIdial resolves dynamic values]
  B --> C{today / yesterday / Ndays?}
  C -->|Yes| D[Compute date at click time]
  C -->|No| E[Use stored custom value]
  D --> F[URL-encode value]
  E --> F
  F --> G[Append name=value to URL]
  G --> H[Report opens with parameters pre-set]

When to use preset constants

The clearest use case is a daily or weekly report that a team manager runs on a fixed schedule. If the report has a date-range picker and the manager always sets it to `yesterday`, creating a custom report link with `start_date=yesterday` and `end_date=today` as preset constants means the report is ready to read the moment it opens. The same logic applies to reports scoped to a single Campaign: preset the campaign ID and managers go directly to their data without navigating through filter dropdowns. For reports that accept `status[]` arrays, you can preset a specific set of Lead statuses to include, which is useful for post-campaign audits.

Preset Constants work alongside the report's own controls — users can still change the parameters once the report loads if they need a different view. The preset is a starting point, not a lock.

For the full walkthrough of creating the custom report entry that holds these constants, see how to add a custom report link to the Reports page. For the wider admin toolset context, read the VICIdial admin bulk tools guide.

Want a hosted VICIdial system where you can build custom report links and preset constants from day one? See VICIfast pricing - you can be live in under 40 seconds.

About VICIfast LLC

VICIfast LLC operates a managed VICIdial hosting + BYOI service for outbound and inbound call centers. We run the dialers, the carriers, the recordings pipeline, and the compliance plumbing so operators don’t have to.

Citing this article

VICIfast Engineering. “How to pass preset date constants to a custom report link”. VICIfast LLC, June 29, 2026. Retrieved from https://vicifast.com/blog/vicidial-custom-report-preset-constants

Have questions?

Related posts

You might be interested in

VICIfast newsletter

Liked this? Get the next one in your inbox.

We ship the kind of stuff you just read — concrete, numbers-first, no drip. One email when a new post goes live. Unsubscribe in one click.

Comments

Comments are reviewed before they appear. We never publish your email.

No comments yet — be the first.