Skip to content

Associate records

Associating two records records that they are related: a contact works at a company, a deal belongs to a contact, a ticket was opened by someone. Prolibu does this in two ways, and they are worth telling apart because they behave differently:

  • A reference field. A form field pointing at another record, such as Company on a contact or Contact on a deal. It lives on the record that declares it and holds a single value.
  • An action that creates a related record. A button that opens another object’s form with the reference already filled in, such as Create deal with this contact in a Contacts row menu.

There is no configurable catalog of relationships: each object ships with its own, in its own form. These are the ones the CRM ships with:

FromToMechanismWhere it appears
ContactCompanyCompany reference fieldContact’s Primary section
ContactDealCreate deal with this contact actionRow’s three-dot menu
DealContactContact reference fieldDeal’s Primary section
TicketContactContact reference fieldTicket’s Requester section

To find out what the object in front of you supports, open one of its records in edit mode and look for the fields that open a searchable picker instead of a text box: those are its reference fields. Actions that create related records live in the row’s three-dot menu.

Three rules follow from this:

  1. A reference holds one value. Choosing another replaces the previous one instead of adding to it. A contact cannot have two companies at once.
  2. The relationship is not automatically two-way. It lives only on the record that declares it. From the other side you get there by filtering the list by that field, as explained below.
  3. There are no association labels. You cannot mark what kind of relationship it is (say “decision maker” or “billing”): the reference either exists or it doesn’t.

There is no separate permission named “associate records.” Associating means editing a field, so two conditions are enough: the user can edit that object, and the reference field is not marked as protected against updates for their role.

Put another way: whoever can edit a contact can change its company, unless someone protected the Company field. The Access Control → Roles matrix applies rules by object and field, and holds no row or rule specifically for associations — see Assign access to records.

A reference field in detail: Contact → Company

Section titled “A reference field in detail: Contact → Company”

From here on the example is Contact → Company. What follows holds for any reference field: only the field name and the object it points at change.

The contact’s Company field (see Primary) is the association. Choosing a company and saving links the contact to that record. This is the manual route, and it’s the one we recommend using always — see Automatic domain association below for why you shouldn’t rely on the automatic one.

To associate a company by hand:

  1. Open the contact and go into edit mode.
  2. In the Company field, click to open the selector and type part of the name of the company you’re looking for.
  3. Pick the company from the results list.

Company selector open on a contact with no company, searching "DOC-AUTO" with the DOC-AUTO-Empresa result highlighted

  1. Click Save. The field is now filled in with the chosen company.

Company field on a contact's record, with the edit, remove, and expand icons

Next to the value are three controls: the pencil opens the related company’s editor in the side panel, the X removes the association (leaves the field empty), and the arrows expand the selector to pick a different company. Only one company can be set at a time — picking a new one replaces the previous one instead of adding to it.

Edit Company record opened from a contact's Company field pencil icon

The Company field’s selector also lets you create a new company without leaving the contact’s form: if you search for a name that doesn’t exist yet, a + Company button appears next to the “No results” message.

Company selector with a no-results search and the + Company button to create a new company, highlighted

Prolibu can also fill the Company field on its own, matching the contact’s email domain against a company’s Domains field. There’s an ordering condition for it to fire: save the domain on the company before the contact exists. The rule fires when the contact is created afterward; it does not go back over contacts that already existed.

  1. Open the company and add the domain (no http:// or www., just the domain) to the Domains field.

Domains field on a company, with "docautotest.com" added as a chip

  1. Create a new contact with an email on that same domain. There’s no need to pick the company by hand: the contact’s Company field already shows it filled in once you save.

Company field on a newly created contact, already filled in with the company whose domain matches the email

Outside that specific case, choosing the company by hand is still the normal route described above. And whether manual or automatic, the relationship is equally permanent: once assigned, the company stays linked to the contact indefinitely. It doesn’t expire, it isn’t reviewed on its own, and it doesn’t unlink through normal system use; it only changes if someone replaces it with another one or clears it from the Company field itself.

Here the model’s second consequence shows up: because the reference lives only on the record that declares it, the record being pointed at carries no list of what points to it. There is no array or Contacts tab on the company’s own record.

The general route, valid for any reference field, is to filter the list of the object that declares the reference by that field. In this example: in the Contacts list, filter by the Company column and pick the company you’re looking for.

Contacts list filtered by Company, showing the filter chip and the result

The View related records (“View company contacts”) button that appears next to some companies in the Companies list does this same filter for you, using that row’s real identifier, so it returns exactly the contacts of that company.

Contacts list filtered after clicking "View company contacts", with the Company chip and the 2-record count highlighted

The second mechanism does not fill in a field on the record you have open: it creates another record that points back at it. A contact doesn’t carry a list of deals on its own record. That association is created with the Create deal with this contact action, and the result shows up afterward in the contact’s activity.

This is the only way to return from a contact to the deal that was created: open the creation entry in its activity.

This is possible, in four ways:

  • From the interface: since a reference field is just another field, it can be changed in bulk like any other. Check several records in the list with each row’s checkbox and use the Edit selected action from the bar that appears at the bottom (“N Items selected”). In the dialog, pick the Company field, choose the company (or turn on Clear value to bulk-disassociate) and confirm with Apply to N records. The same mechanism works for any other bulk-editable field, not just Company — see Editing records in bulk.

Edit selected dialog with Company picked as the field, a company chosen as its value, and Apply to 2 records highlighted

  • Through import: the companyName column in the Contacts import file links each row to an existing company, as explained in Formatting import files. It’s a reference to a company that already exists, not the creation of a new one in the same upload — see Importing records for multiple objects.
  • Through the API: manual association also works when updating the contact: PATCH /v2/contact/:id with the company identifier in the company field.
  • By email domain: if the company already has its domain saved beforehand, any new contact with an email on that domain gets associated with it on its own, without being picked by hand (see the Automatic domain association section above).
  • Through Scripts: Scripts (Development → Scripts) is code that runs when a lifecycle hook fires for a chosen object — for example, every time a Contact is created or updated. The mechanism — arbitrary code triggered by an object event, with read/write access — supports implementing that logic.

Create Script dialog with the Contact object selected in Lifecycle hooks, highlighted

None of the above is exclusive to Contacts: it is the pattern the rest of the CRM objects follow.

Tickets shows it from the other side. Its Create Ticket form has a Requester section with two reference fields, Contact and User — the first behaves exactly like a contact’s Company field (one value, searchable picker, relationship stored on the record that declares it), except here the ticket is the one declaring it.

Deals does the same with their Contact field, in the Primary section. That field is the counterpart of the Create deal with this contact action: when you use the action from a contact, what gets filled in is precisely that field on the new deal.

Create Ticket form with the Requester section and the Contact field filled in with DOC-AUTO-Contacto, highlighted

Meetings, Courses, Listings, and Services are CMS Hub concepts with no known equivalent in Prolibu, so they don’t apply.

Frequently asked questions

Was this article helpful?