updateLeadContacts
Partially update a lead's contacts. Each contact in the input is processed independently: a contact number identifies an existing contact to update, while an omitted, null, or empty contact number creates a contact. For an existing contact, omitted fields retain their existing values. Explicit null or empty values clear scalar fields, including givenName, familyName, email, phoneNumber, landlineNumber, preferredLanguage, and nationalId; null or an empty value for extraDetails clears those details. For contactAddress, omission leaves the address unchanged, null clears it, and an address value replaces it. For roles, omission or null leaves roles unchanged, a non-empty list replaces them, and an empty list is invalid. For consents, omission, null, or an empty list leaves existing consents unchanged; a non-empty list adds or updates the supplied consent types but does not revoke other types. Contacts omitted from the list remain unchanged, and an empty list makes no contact changes.
Arguments
The lead and per-contact partial updates to apply. This mutation does not delete contacts omitted from the list.
- KT-CT-1113: Disabled GraphQL field requested.
- KT-CT-4121: Invalid phone number.
- KT-CT-4126: Invalid landline number.
- KT-CT-4127: Invalid mobile number.
- KT-CT-7899: An internal error occurred.
- KT-CT-8902: Unable to create lead.
- KT-CT-8907: Lead not found.
- KT-CT-8908: Account representative not found.
- KT-CT-8932: Lead contact details missing account holder.
- KT-CT-8934: Lead contact details missing account representative.
- KT-CT-8935: National ID bad input.
- KT-CT-8940: Lead contact role already exists.
- KT-CT-8941: Invalid language preference code.
- KT-CT-8958: A lead contact must have at least one role.
- KT-CT-8966: There is already one contact with the role account holder for this lead.
- KT-CT-8976: There is already one contact with the role account representative for this lead.
- KT-CT-8980: Lead contact not found.
- KT-CT-8987: Lead contact does not belong to lead.
- KT-CT-9017: Consent type not found.
Examples
mutation UpdateLeadContacts($input: UpdateLeadContactsInput!) {
updateLeadContacts(input: $input) {
contacts {
...LeadContactWriteResultFragment
}
leadNumber
}
}
Variables
{
"input": UpdateLeadContactsInput
}
Response
{
"data": {
"updateLeadContacts": {
"contacts": [LeadContactWriteResult],
"leadNumber": "study-news-politics-control-yeah"
}
}
}