Cyber Week: a free onboarding call with every new server, until 7 December. See plans
VICIfast
ENES
Guides & tutorials

Where to keep your CRM's record ID on a VICIdial lead

VICIdial sends results back with its own lead_id. Store the CRM's record ID on the lead, in a field long enough for it, so every result finds its record.

VICIfast Support
··4 min read
Where to keep your CRM's record ID on a VICIdial lead

Your CRM hands a lead to VICIdial, an agent calls it, and the result comes back carrying a number your CRM has never seen. That number is VICIdial's own lead_id, and unless the Lead also carries the CRM's record ID, something has to guess which record the result belongs to.

The fix is a decision you make once, at load time: which lead field holds the CRM's ID. Get it right and screen-pops, call results and AI outcomes all land on the right record. Get it wrong and you end up matching on phone numbers. The integrations guide shows where this step sits in a whole call.

Why matching on the phone number goes wrong

A phone number is not a record ID. The same number can sit on a person and a company, or on two people at one office, and something then has to decide which record gets the call result.

VICIdial's own tools show the same problem from the other side. When update_lead finds more than one lead with a matching phone number, it updates only one by default: the most recently loaded. The older lead keeps its stale status unless you say otherwise with the records option. That is fine when you meant it and a quiet mess when you didn't.

The three fields that can hold it

FieldHoldsGood to know
vendor_lead_code1 to 20 charactersShows as the Vendor ID on the agent screen
source_id1 to 50 charactersFits longer IDs that won't fit the vendor lead code
Custom fieldsWhatever you define on the listOne per extra ID, such as a deal next to a person

The Vendor lead code is the usual home. It travels in web form, script and Dispo Call URL variables as --A--vendor_lead_code--B--, and update_lead can search by it. Our HubSpot integration keeps the HubSpot record ID there.

Check the length before you choose. If your CRM's record IDs can run longer than 20 characters, they won't fit, and a cut-off ID points at nothing. Open a few records in your browser, look at the IDs in their addresses, and pick source_id if any come close to the limit.

If you need two IDs, use two fields. Our Pipedrive integration loads both the person ID and the deal ID with each lead. A Custom field, an extra field you define on a Lead list, is the usual place for the second one.

What the stored ID does for you later

flowchart LR
  A[CRM record] -->|record ID in vendor_lead_code| B[VICIdial lead]
  B --> C[Agent call and disposition]
  C -->|lead_id and vendor_lead_code| D[Dispo Call URL]
  D --> E[Service in between]
  E -->|update by record ID| A

Screen-pop. A web form that starts with VAR can put --A--vendor_lead_code--B-- straight into the CRM record's address, so the right record opens with no search.

Call results. The Dispo Call URL carries the lead's fields plus the Disposition, the result code the agent picked. The service that writes to the CRM reads the ID from the request instead of hunting by phone number. Syncing dispositions out of VICIdial covers the sending side.

Updates from the CRM. update_lead can find a lead by lead_id, vendor_lead_code or phone_number (its search_method), trying lead ID first, then vendor lead code, then phone. search_location narrows that to a LIST, a CAMPAIGN or the whole SYSTEM (the default). The API user needs modify_leads set to 1 and user level 8 or higher.

AI outcomes. If an AI agent writes its results into the same lead fields, its webhook carries the VICIdial lead_id. Your service can pull that lead with lead_all_info and read the CRM ID off it.

None of add_lead's duplicate checks look at vendor_lead_code. They compare phone_number, alt_phone, title and name, so loading the same CRM record twice under a new phone number makes two leads. To load by CRM ID instead, call update_lead with insert_if_not_found=Y: it adds the lead only when no match is found, and then it needs phone_code, phone_number and list_id.

A Duplicate check on phone still has its place for leads from outside the CRM; duplicate checking on add_lead shows the scopes. For a CRM feed, matching on the record ID is the cleaner rule.

Frequently asked

› Can I put the CRM ID in the lead's comments instead?
You can, but update_lead can only search by lead ID, vendor lead code or phone number, and an AI agent writes its one-line summary into Comments. A searchable field is easier to match on later.
› What if my leads come from both a CRM and a lead vendor?
Keep the CRM's ID in one field for every lead that has one, and put the vendor's own reference in a different field, so the two never collide.

Where the ID lives decides how the rest of the CRM side works: record matching, retries and every write that follows. We build that link as a fixed-fee project, quoted in writing within 48 hours of a discovery call.

About VICIfast

We run VICIdial servers for call centres, so you don’t have to. You get the dialer set up, secured and kept running — we handle the server, the updates and the backups. Bring your own phone carrier at no markup, or use VICIfast Voice, our own US calling and numbers, from $0.0085 a minute. From $49 a month per server.

Questions? Call +1 636 556 0022 and talk to someone who runs dialers.

Citing this article

VICIfast Engineering. “Where to keep your CRM's record ID on a VICIdial lead”. VICIfast LLC, December 2, 2026. Retrieved from https://vicifast.com/blog/crm-record-id-on-vicidial-lead

Have questions?

Related posts

You might be interested in

Comments

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

No comments yet - be the first.