What is an OCR?
Opportunities belong to a company, and contacts also belong to a company. But not every contact at a company is involved in every deal. An OCR lets you specify exactly which contacts are participating in a given opportunity and what role they play. Each OCR carries its own data:| Field | Description |
|---|---|
| Contact | The specific contact linked to the opportunity. |
| Role | The contact’s role on this opportunity (e.g., Decision Maker, Influencer, Economic Buyer, Technical Evaluator). |
| Primary | Whether this contact is the primary contact for the opportunity. Each opportunity can have one primary contact. |
Why relationships need their own fields
You might wonder why OCR data (like role and primary status) doesn’t just live on the contact record or the opportunity record. The reason is that these values are specific to the combination of a contact and an opportunity. They don’t belong to either entity alone. Consider this scenario:- Vasav Jain is a Decision Maker on the Dremio - Enterprise opportunity.
- Vasav Jain is also a Technical Evaluator on the Dremio - Starter Plan opportunity.
Many-to-many relationship
OCRs create a many-to-many relationship between contacts and opportunities:- A single contact can be assigned to multiple opportunities.
- A single opportunity can have multiple contacts assigned to it.
- A contact with multiple OCRs. If a contact is assigned to several opportunities, any logic that iterates over their opportunity roles will return all of them. Make sure your workflow or personalization logic accounts for this if you only want to reference a specific deal. For example, use filters or conditions to target the right opportunity by stage, name, or other criteria.
- Multiple primary contacts. Each opportunity can have one primary contact, but a single contact can be the primary on multiple opportunities simultaneously. Do not assume that
is_primaryis unique across a contact’s roles. It is unique per opportunity, not per contact. - Contacts without OCRs at a company with opportunities. A contact may belong to a company that has opportunities, but if the contact has no OCR assignments, their direct opportunity roles will be empty. However, they can still access company-level opportunity data.
- Duplicate roles. A contact could theoretically have the same role on two different opportunities at the same company. Ensure your logic doesn’t assume role uniqueness across opportunities.
Accessing OCR data in personalization
When using Liquid templating in workflows and emails, you can reference opportunity data through two distinct paths, depending on whether you need company-level or contact-level access:Company opportunities
Access all opportunities associated with the contact’s company usingcompany._opportunities. This returns up to 10 of the most recently created opportunities, regardless of whether the contact has an OCR on them.
Contact opportunity roles
Access only the opportunities where the contact has a direct OCR assignment usingopportunity_roles. This returns up to 10 of the most recently created OCRs, along with the contact’s role and primary status.
When to use which
| Path | Use when… |
|---|---|
company._opportunities | You want to reference any deal at the contact’s company, regardless of whether the contact is directly involved. Useful for account-level messaging (e.g., “Your company has an open deal”). |
opportunity_roles | You want to reference only the deals where this specific contact has a role. Useful for contact-level personalization (e.g., “As the Decision Maker on the Acme deal…”). |