Mutation
mutation UpsertAccountField($input: UpsertAccountFieldInput!) {
upsertAccountField(input: $input) {
accountField {
id
source
externalFieldId
value {
__typename
... on AccountFieldStringValue {
__typename
}
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
result
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"accountFieldIdentifier": {
"externalFieldId": "id"
},
"type": "STRING_TYPE"
}
}Response
{
"data": {
"upsertAccountField": {
"accountField": {
"id": "id",
"source": "string",
"externalFieldId": "id",
"value": {
"__typename": "AccountFieldStringValue"
},
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
},
"result": "UPDATED",
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
upsertAccountField
Sets or updates a field value for a specific account. Identify the target field using accountFieldIdentifier (account ID + external field ID) and pass exactly one value argument matching the schema’s type (e.g. stringValue, numberValue, booleanValue, arrayValue, dateValue, userReferenceValues, or accountReferenceValues). Requires the tenantField:create, tenantField:update, and tenantFieldSchema:read permissions. Identifying the account by externalId also requires the tenant:read permission.
MUTATION
upsertAccountField(input: UpsertAccountFieldInput!): UpsertAccountFieldOutput!Arguments
input
required
Returns
accountField
result
error
Mutation
mutation UpsertAccountField($input: UpsertAccountFieldInput!) {
upsertAccountField(input: $input) {
accountField {
id
source
externalFieldId
value {
__typename
... on AccountFieldStringValue {
__typename
}
}
createdAt {
unixTimestamp
iso8601
}
createdBy {
__typename
... on UserActor {
__typename
}
}
}
result
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"accountFieldIdentifier": {
"externalFieldId": "id"
},
"type": "STRING_TYPE"
}
}Response
{
"data": {
"upsertAccountField": {
"accountField": {
"id": "id",
"source": "string",
"externalFieldId": "id",
"value": {
"__typename": "AccountFieldStringValue"
},
"createdAt": {
"unixTimestamp": "string",
"iso8601": "string"
},
"createdBy": {
"__typename": "UserActor"
}
},
"result": "UPDATED",
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

