Create or update a record based on unique value(s).
| Property | Behavior |
|---|---|
match | Values to match against existing records. At least one of these values must be a unique attribute to avoid matching more than one record. Any number of additional attribute values (unique or non-unique) can also be specified. |
create | Values to fill in if a new record is created. All required attributes on the object must be specified here or the request will fail. |
update | Values to overwrite if an existing match is found. These values will replace any existing values on the record. |
defaults | Values to fill in if there is not already an existing value for them. When creating a record, these will be populated in addition to any create values. When updating a record, these will never overwrite existing values but will be used for attributes that are curently empty. |
match in the request which defines the value(s) that will be
used to find a matching record. In addition, you must specify either create or
defaults. Otherwise, all properties are optional.
The upsert method is the most reliable way of sending data into Unify, so if
you’re not sure what method to use, this is the one we recommend.
Upsert a company
Upsert a person
company is the name of a reference attribute on the
person object which references a company object record. This request will
create a new company if it doesn’t already exist, update it if it does, and
then link this person to that company.The use of defaults for the company upsert means that we will fill in the
name and domain of the company, but if the company already exists, we
won’t overwrite its existing values.Likewise, the use of defaults for the person upsert means that we will
only fill in the lead_source of this person record if it is currently
empty or if we end up creating a new record.Upsert a custom record
product_user:defaults, these values
will be filled in if the record is created or if the existing record
doesn’t already have values for them.Request body for upserting a record.
The attribute values to match against to find an existing record.
The attribute values to use when creating a new record if no match is found.
The attribute values to use when updating an existing record if a match is found.
Default attribute values to apply during both creation and update operations.