Create or update record by key field
beaconcrm_upsert_recordDestructive
WRITE: create a record, or update the existing one whose key field matches. primary_field_key names the field used to find the match (for example "emails" for a person, or "external_id"); fields must contain a value for it. If a record matches it is UPDATED with the given fields (an empty array leaves an existing value untouched on upsert); otherwise a new record is created. Beacon workflows may run as a result. PUT /entity/{entity}/upsert.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entity | Yes | Record type key, e.g. person, organization, payment or a custom type such as c_application. See beaconcrm_list_record_types. | |
| fields | Yes | Field values keyed by field key, in Beacon's field formats (see beaconcrm_list_record_types for keys). Select and point-to-record fields are ARRAYS (e.g. {"type": ["Donation"], "customer": [1725]}); emails are [{"email", "is_primary"}]; currency is {"value", "currency"}; dates are ISO strings. | |
| primary_field_key | Yes | Field key used to match an existing record, e.g. emails or external_id. |