addCustomObjectFieldToRequest

View as Markdown

Add a Custom Object relationship field to Requests.

Creates a RELATIONSHIP field on Requests that links to a specific custom object type. For example, add a “Contract” field to requests so agents can link requests to contracts.

Parameters

NameTypeRequiredDescription
workspaceIdintegerYesThe workspace ID where the field should be added.
entity_typestringNoEntity type (ASSET, REQUEST, CUSTOM_OBJECT). Set automatically based on endpoint.
typestring (enum, 18 values)YesThe field type. Valid values: SHORT_TEXT, LONG_TEXT, RICH_TEXT, NUMBER, DECIMAL,
display_namestringYesHuman-readable field label (e.g., “Visa Number”, “Assigned Agent”)
reference_keystringNoMachine-readable key. Auto-generated if not provided.
required_fieldbooleanNoWhether this field is required when creating instances. Default: False.
hintstringNoPlaceholder/help text shown in the form input
orderintegerNoDisplay order in the form. Auto-assigned if not provided.
optionsobject[]NoFor DROPDOWN/MULTI_DROPDOWN only. Valid option values.
relationshipobjectNoFor RELATIONSHIP fields only. Target entity configuration.
request_typesSERVICE_REQUEST | INCIDENT | PROBLEM[]NoFor adding fields to Requests only. Scopes which request types the field applies to.
asset_settingsobjectNoFor adding fields to Assets only. Specifies which asset types the field applies to.