Changes data

quotecloud_create_data_item

Create a company-wide custom data item (merge field) definition, available to every document, template, contact, product or user of that connection. Supports all nine types; select, multiselect and check take an option list; defaultValue is validated against the type. Creating a contact item also creates its document-side twin, as the settings page does. Idempotent by label: if an active company-wide item with the same label (case-insensitive) and connection exists, it is returned with created:false instead of a duplicate (change its type or options with quotecloud_update_custom_data_definition). For document and template items the response also carries html (a data-item span to write into text blocks) and token ([[dataItem-<id>]], for table cells). Writes company settings, requires customData:write, only runs when customData.manage is enabled, and needs the company owner or the manageCompanySettings role permission plus the Custom Data Items add-on. Not dangerous: no confirmation is required. To add an item to one document only, use quotecloud_add_document_data_item instead.

Inputs

labelRequired
string
typeRequired
string, number, currency, date (YYYY-MM-DD), dateTime (YYYY-MM-DDTHH:MM), boolean, select (one option), multiselect (several options) or check (a tick box). one of: string, number, date, dateTime, boolean, currency, select, multiselect, check
connectionRequired
Which records carry the item. document and template items are document merge fields. one of: document, template, contact, product, user
defaultValueOptional
The default new documents start with, in the item’s own type. A date may also be currentDate, days:N (N days after creation) or none. value
mandatoryOptional
Whether validation requires a value. Defaults to false. boolean
optionsOptional
The option list for a select, multiselect or check item. Not allowed for other types. list of string