Create or update a record based on unique values.
| 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. |
create | Values to use when creating a new record. |
update | Values to use when updating an existing record. These values will replace any existing values on the record. |
update_if_empty | Values to use when updating an existing record. These values will only be used if the attribute is currently empty. |
create_or_update | Values to use when creating a new record or updating an existing record. When updating, these values will replace any existing values on the record. |
create_or_update_if_empty | Values to use when creating a new record or updating an existing record. When updating, these values will only be used if the attribute is currently empty. |
match and one of create, create_or_update, or create_or_update_if_empty.
All other 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.Upsert a custom record
product_user:create_or_update, these
values will be filled in if the record is created or overridden if an
existing record is found.Validation mode to use when validating request data.
strict validation will fail requests if any attribute fails validation,
including unrecognized attributes.
ignore_invalid validation will strip out unknown attributes and replace
known, non-required attributes with undefined if they fail validation.
The request will still fail if the request body does not contain the proper
structure or if any required attributes fail validation.
strict, ignore_invalid Request body for upserting a record.
At least one of create, create_or_update or create_or_update_if_empty
must be provided, and all required attributes on the object must be included
in at least one of these properties.
When the same attribute is specified in multiple properties, the values will be applied in a specific order of precedence. If a record is being created, the following order is used:
createcreate_or_updatecreate_or_update_if_emptyIf an existing record is being updated, the following order is used:
updatecreate_or_updateupdate_if_emptycreate_or_update_if_emptyThe attribute values to match against to find an existing record.
At least one unique attribute must be included to ensure that at most one record is matched. Additional unique or non-unique attributes may also be included to refine the matching criteria.
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.
The attribute values to update when a matching record is found and the
existing attribute value on the record is null.
The attribute values to apply during both creation and update operations.
The attribute values to apply during both creation and update-if-empty operations.