Create, update or delete a contact

distru-mutate-company-contactWrite

Creates, updates or deletes one contact (a person) at a customer or vendor company, or at your own.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
actionenum
CREATEUPDATEDELETE
Yes
idstringNoRequired for UPDATE and DELETE. Resolve via distru-search-contacts.
companyIdstringNoRequired for CREATE; cannot change afterwards. A customer, a vendor or your own company. Resolve via distru-search-companies.
firstNamestringNoRequired for CREATE.
lastNamestring or nullNoSend null to clear it.
titlestring or nullNoSend null to clear it.
descriptionstring or nullNoSend null to clear it.
emailstring or nullNoSend null to clear it.
phonestring or nullNoSend null to clear it.
workPhonestring or nullNoSend null to clear it.
ownerIdstring or nullNoDistru user responsible for the contact. Resolve via distru-search-users. Send null to clear it.
driverLicenseNumberstring or nullNoSend null to clear it.
driverLicenseIssuingStatestring or nullNoTwo-letter US state code, e.g. CA. Send null to clear it.
customFieldsobject[]NoOnly the fields listed change. Required custom fields must be set, on update too, while still blank.
customFields[].customFieldIdstringYesResolve via distru-search-custom-fields (entityType CONTACT).
customFields[].valuestring or string[]YesTEXT: the text. DROPDOWN: the option name. CHECKBOX: an array of option names. DATE: YYYY-MM-DD, company timezone. "" or [] clears the field.

Output

This tool returns one of 2 shapes, depending on its inputs.

Presence on a nested field assumes its parent exists.

Result with contact

FieldTypePresenceDescription
contactobjectAlways
contact.idstringAlways
contact.firstNamestringAlways
contact.lastNamestringNull or absent
contact.titlestringNull or absent
contact.descriptionstringNull or absent
contact.emailstringNull or absent
contact.phonestringNull or absent
contact.workPhonestringNull or absent
contact.ownerobjectNull or absent
contact.owner.idstringAlways
contact.owner.fullNamestringNull or absent
contact.driverLicenseNumberstringNull or absent
contact.driverLicenseIssuingStatestringNull or absent
contact.customFieldsobject[]Always
contact.customFields[].customFieldobjectAlways
contact.customFields[].customField.idstringAlways
contact.customFields[].customField.namestringAlways
contact.customFields[].customField.fieldTypeenum
CHECKBOXDATEDROPDOWNTEXT
Always
contact.customFields[].valuestringCan be nullNull when unset. DATE values are days (YYYY-MM-DD) in the company timezone; CHECKBOX values are the selected option names, separated by commas.

Result with id

FieldTypePresence
idstringAlways
What the AI reads

Creates, updates or deletes one contact (a person) at a customer or vendor company, or at your own. A contact, or company, hidden from you by team visibility is refused as permission denied. Some old contacts share a Distru user's profile; their name, title, description, email and phones can't be changed. Read current values with distru-get-company first (includeContacts). DELETE soft-deletes the contact. CREATE and UPDATE return the contact as distru-get-company does; DELETE returns its id. Sparse update: UPDATE changes only the fields sent; a field sent as null is cleared.