Twenty CRM icon

Twenty CRM

Interact with Twenty CRM - Open Source CRM

Company → Upsert

AI-generated

Summary

Upsert a company in Twenty CRM by searching for an existing record using a specified match field (Domain Name, Name, or LinkedIn URL) and match value; update the found company with provided data or create a new company if no match is found.

Inputs

  • Match Field (required) — Field to match for finding existing company; options are Domain Name, Name, or LinkedIn URL.
  • Match Value (required) — The value to search for in the match field to locate an existing company.
  • Name (required) — The name of the company, required when creating a new company record.
  • Additional Fields — Optional additional company details such as address, annual recurring revenue, domain name, number of employees, ideal customer profile flag, industry, LinkedIn URL, and X (Twitter) URL.
  • Custom Fields — Custom fields as key-value pairs with API field names and their values; URLs are auto-detected and converted to the appropriate links object format.

Output shape

a single company record object representing the created or updated company

The operation first attempts to find a matching company by the specified match field and value. If found, it updates the company with the provided fields; otherwise, it creates a new company. Custom fields are transformed appropriately before the request. The response includes the upserted company data.

Examples

Example 1: Update a company by its domain name

Set Match Field to Domain Name, provide an existing domain in Match Value, and specify fields such as Name and any Additional or Custom Fields to update.

Example 2: Create a new company if no existing match

Set Match Field and Match Value to search, provide a Name for the new company, and optionally include Additional or Custom Fields; if no existing company matches, a new record is created.

Links

Discussion