REST Resource: projects.locations.instances.calculatedFieldDefinitions

Resource: CalculatedFieldDefinition

Represents a Calculated Field Definition.

JSON representation
{
  "name": string,
  "displayName": string,
  "description": string,
  "calculationType": enum (CalculationType),
  "formulaExpression": string,
  "outputType": enum (OutputType),
  "targetField": string,
  "enabled": boolean,
  "dependentFields": [
    string
  ]
}
Fields
name

string

Identifier. The resource name of the CalculatedFieldDefinition. Format: projects/{project}/locations/{location}/instances/{instance}/calculatedFieldDefinitions/{calculatedFieldDefinition}

displayName

string

Required. User-friendly display name. Must be unique within the instance.

description

string

Optional. Optional description.

calculationType

enum (CalculationType)

Required. Type of calculation.

formulaExpression

string

Required. The raw formula string.

outputType

enum (OutputType)

Required. Expected output type of the formula. Examples: TEXT, INTEGER, BOOLEAN, TIMESTAMP, ARRAY_TEXT

targetField

string

Required. The name of the field where the result is stored. e.g. case.priority

enabled

boolean

Optional. Whether the calculated field is enabled. Defaults to true.

dependentFields[]

string

Output only. The fields that this definition depends on. Populated by the backend.

CalculationType

Enum for Calculation Type.

Enums
CALCULATION_TYPE_UNSPECIFIED Default value. This value is unused.
SET_VALUE The formula sets a value on the target field.

OutputType

Enum for Output Type.

Enums
OUTPUT_TYPE_UNSPECIFIED Default value. This value is unused.
OUTPUT_TYPE_TEXT The output type is Text.
OUTPUT_TYPE_INTEGER The output type is Integer.
OUTPUT_TYPE_BOOLEAN The output type is Boolean.
OUTPUT_TYPE_TIMESTAMP The output type is Timestamp.
OUTPUT_TYPE_ARRAY_TEXT The output type is Array of Text.

Methods

create

Create a CalculatedFieldDefinition.

delete

Delete a CalculatedFieldDefinition.

fetchAvailableTargetFields

Searches for fields available to be used as a TargetFieldName for a new Calculated Field.

fetchDynamicOptions

Get Dynamic Options for a target field based on Calculated Field definitions.

get

Get a CalculatedFieldDefinition.

list

List CalculatedFieldDefinitions.

patch

Update a CalculatedFieldDefinition.

validateDependency

Validate a potential dependency for a Calculated Field formula.