Skip to navigation

Data Types

View as Markdown

platform.extensions.data-types

A data type describes a business object, such as a purchase order, and how the assistant finds the right one when a user mentions it: by looking it up through an action, or from a fixed list of options.

To learn what data types do, see Data Types in the Tool Studio docs.

  • Endpoint: /platform/extensions/data-types | Methods: GET, PATCH, POST
  • Request shape: fields go at the top level of the JSON body, with no resource wrapper. The item’s id goes in the URL for reads and updates, not in the body.
  • Updates: a JSON merge-patch with version: {num, change_description} from your last read. Lists of objects merge row by row, so read first and send the whole list when you remove or reorder rows. See Tool Studio.
  • References: Slots and arguments use the type by its name (for example {"custom": "u_PurchaseOrder"}), not its id. A dynamic_lookup resolver calls an HTTP action by the action’s id.

Endpoints

All paths are relative to https://api.moveworks.ai/configurations/v1alpha1. Each endpoint page lists the request and response schema, an example, and the errors it can return.

MethodPathEndpoint reference
GET/platform/extensions/data-typesList data types
POST/platform/extensions/data-typesCreate data type
GET/platform/extensions/data-types/{id}Get data type
PATCH/platform/extensions/data-types/{id}Update data type

Rules the API checks

  • The server sets name from friendly_name (“Purchase Order” becomes u_PurchaseOrder). Don’t send it, and it can’t be changed.
  • friendly_name is 3–64 characters and description is 3–256 characters.
  • resolution_strategy.name can’t be changed after creation. On update, resolver_methods is replaced whole.
  • Set system_usage_config.mentionable_fields and identifiable_fields so the assistant can cite and identify records of this type.

Fields

FieldTypeRequiredNotes
idstringread-onlyUnique identifier of the data type, assigned by the server. Cannot be changed.
namestringread-onlyType name derived from friendly_name on create, in the format u_PascalCase (for example, Purchase Order becomes u_PurchaseOrder). Read-only.
friendly_namestring✅User-friendly display name for the data type (3 to 64 characters).
descriptionstring✅Description of what the data type represents (3 to 256 characters).
schemaobject✅JSON schema for one instance of the data type. Required.
resolution_strategyDataTypeResolutionStrategy✅Default resolution strategy used to resolve values of this data type. Required.
system_usage_configDataTypeSystemUsageConfigControls which fields the assistant sees and uses for citations and identification.
updated_timestringread-onlyWhen the configuration was last updated.
updated_bystringread-onlyWho last updated the configuration.
versionVersion✅Document version. On update, send back the num from your last read.
type_idstringread-onlyValue other resources store to reference this data type, such as a slot’s type.custom. Assigned by the server and different in each tenant.

Example create body

{
"friendly_name": "Purchase Order",
"description": "A purchase order in the ERP system.",
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string"
},
"total": {
"type": "number"
}
}
},
"resolution_strategy": {
"name": "purchase_order_resolution",
"resolver_methods": [
{
"id": "by_po_number",
"input_schema": {
"type": "object",
"properties": {
"po_number": {
"type": "string"
}
}
},
"dynamic_lookup": {
"http_action": "1b7d4f5a-2c88-4e0b-9f31-7c5a0d9e4411",
"input_mapper": {
"po_number": "data.po_number"
},
"produces_multiple_candidates": false
}
}
]
},
"system_usage_config": {
"mentionable_fields": [
"id",
"status"
],
"identifiable_fields": [
"id"
]
},
"version": {
"change_description": "Initial version."
}
}