Mutation
mutation UpsertAccountFieldSchema($input: UpsertAccountFieldSchemaInput!) {
upsertAccountFieldSchema(input: $input) {
accountFieldSchemas {
id
source
externalFieldId
label
type
options
}
results
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"accountFieldSchemas": [
{
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"isVisible": true,
"order": 1
}
]
}
}Response
{
"data": {
"upsertAccountFieldSchema": {
"accountFieldSchemas": [
{
"id": "id",
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"options": [
"string"
]
}
],
"results": [
"UPDATED"
],
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
upsertAccountFieldSchema
Creates or updates one or more account field schemas in a single call. Each schema is identified by the combination of source and externalFieldId — if a schema with that pair already exists it is updated, otherwise a new one is created. Requires the tenantFieldSchema:create, tenantFieldSchema:update, and tenantFieldSchema:delete permissions.
MUTATION
upsertAccountFieldSchema(input: UpsertAccountFieldSchemaInput!): UpsertAccountFieldSchemaOutput!Arguments
input
required
Returns
accountFieldSchemas
results
[UpsertResult!]
The outcome per input schema, ordered to match input.accountFieldSchemas.
error
Mutation
mutation UpsertAccountFieldSchema($input: UpsertAccountFieldSchemaInput!) {
upsertAccountFieldSchema(input: $input) {
accountFieldSchemas {
id
source
externalFieldId
label
type
options
}
results
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"accountFieldSchemas": [
{
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"isVisible": true,
"order": 1
}
]
}
}Response
{
"data": {
"upsertAccountFieldSchema": {
"accountFieldSchemas": [
{
"id": "id",
"source": "string",
"externalFieldId": "id",
"label": "string",
"type": "STRING_TYPE",
"options": [
"string"
]
}
],
"results": [
"UPDATED"
],
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

