Custom field attributes
Example of JSON representation:
{
"custom_field": {
"field_id": "f07ca4b0-51b0-11ee-a424-0015172d2a7d",
"enable": true,
"tenant_id": "9079d60a-5192-11ee-aa89-0015172d2a7d",
"name": "Call type",
"is_global": false,
"description": "Type of the call, like "Sales, Collection, etc.",
"type": "option",
"display_as": "default",
"str_max_len": 64,
"editable": true,
"search_options": [
"advanced"
],
"options": [
"Collection call",
"Sales call"
],
"ai_assist": false
}
}
- field_id (UUID, read-only)
-
Unique ID of custom field assigned by MiaRec application when a custom field is created. Read-only.
This field is returned in
GET
request only. It is ignored inPUT
andPOST
requests. - tenant_id (UUID, optional)
-
ID of the parent tenant's object. This field is available only when all the following conditions are true:
- Multi-tenancy is enabled in the MiaRec application,
- The REST API user belongs to the System tenant,
- The REST API user has permissions to view the corresponding tenant, and
- The custom field is not global.
If REST API user is a tenant user, and such a user creates a new custom field, then user's tenant_id is implicitely used as the custom field's tenant_id.
If a custom field is global, then
tenant_id
isnull
. - name (string, required, maximum 64 characters)
-
Name of the custom field
- description (string, optional, maximum 4096 characters)
-
Human-friendly description of the field
- enable (bool, required)
-
A boolean flag to enable the custom field. If a custom field is disabled, end users will not be able to view, search or edit the custom fiel values.
- is_global (bool, optional)
-
A boolean flag to make the custom field visible to all tenants. This flag is ignored unless the following conditions are true:
- Multi-tenancy is enabled in the MiaRec application,
- The REST API user belongs to System tenant, and
- The REST API user has access scope
Unrestricted
orSystem
.
Tenant users cannot create global custom fields.
- type (string, required)
-
A type of field, available options:
string
: A free-text value. In UI, users will be able to enter any text into this field.date
: A date value, for example, shipping date. In UI, users will be able to choose a valid date for this field.option
: A categorical value (see attributeoptions
below). In UI, users must choose a value from a list of pre-defined options.
- options (list of strings, optional)
-
A list of options for custom field of type
option
. The options must be pre-programmed by administrator ahead of time. Each option is a string up to 256 characters.Example:
{ "custom_field": { "name": "Call type", "type": "option", "options": [ "Sales call", "Technical support call", "Voicemail", ] } }
- display_as (string, optional)
-
A display widget for the custom field.
Permitted values:
default
: Use a default display widget depending on the field type.label
: Display as a labelmultiline
: Display as a multi-line field. Normally used for long texts, for a call summary.
- str_max_len (number, optional)
-
A maximum text length (up to 8096 characters). Applicable to field type
string
only. - editable (bool, optional)
-
Allow authorized users to edit values of this field via UI or REST API. Users must have permission
Edit
for the correspoding call record. - search_options (set of strings, optional)
-
Allow users to use this custom field in search of call records.
Allowed options (any combination):
advanced
: Users can use this custom field in Advanced Search of call records.free_text
: Application searches in this field's values when users are searching a text in Basic Search input. Not recommended as it affects peformance of basic search.
Example:
{ "custom_field": { "name": "Ordered product", "type": "string", "search_options": [ "advanced", "free_text" ] } }
- ai_assist (bool, optional)
-
Allow administrators to populate values of this field with AI Assistant job. When enabled, such a field will be available for selection in AI Assist jobs (requires voice analytics license).