Skip to content

Process (Workflow) ​

Workflow (process) management: creation, templates, fields, and document templates.

Endpoints ​

EndpointArgumentsReturns
process.create{ name: string, description: string }unknown
process.create_docTemplateFieldoptionsunknown
process.create_fieldprocessId, ProcessFieldCreateobject
process.delete_docTemplateFieldoptionsunknown
process.get_next_prefix_idObjectIdobject
process.install_templatetemplateId: stringHailerResult
process.listunknown, ObjectIdany[]
process.list_templates-object[]
process.removeObjectIdboolean
process.remove_fieldprocessId, fieldIdboolean
process.set_docTemplateFieldPropertyoptionsunknown
process.set_docTemplatePrintNameObjectId, ObjectId, unknownunknown
process.set_documentTemplateObjectId, DocumentTemplateunknown
process.set_documentTemplatesObjectId, DocumentTemplatesunknown
process.set_infoObjectId, ProcessUpdate, unknownboolean
process.update_fieldprocessId, fieldId, ProcessFieldUpdate, unknownboolean

process.create ​

Description

API endpoint for creating a workflow/dataset in Hailer. If you are able to, we strongly recommend using the web UI. The doc for this endpoint looks bad and is currently being refactored.

Parameters

Argument 1 (object, optional):

FieldTypeRequiredDescription
namestringno
descriptionstringno
defaultViewstringno
workspaceIdWorkspaceIdnoCreate in workspace, if not given the current workspace will be used.
enableMapLocationbooleanno
enableUnlinkedModebooleannoMark as dataset/database
enableUniqueNamebooleanno
defaultGroupByFieldstringno

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.create', [
  {
    name: 'string',
    description: 'string',
  },
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.create_docTemplateField ​

Description

Create field inside template.fieldMap under documentTemplates.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
processIdObjectIdyesProcess Id
namestringyesTemplate name
groupimages | activityLinks | fieldsyesGroup inside template.fieldMap (images, activityLinks or fields

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.create_docTemplateField', [
  {
    processId: '507f1f77bcf86cd799439011', // Process Id
    name: 'string', // Template name
    group: 'images', // Group inside template.fieldMap (images, activityLinks or fields
  },
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.create_field ​

Description

Calling this endpoint with the appropriate permissions and a correctly formatted fieldObject will add a new field to the selected workflow/dataset.

Example: If provided the field parameter object {"label": "Total cost", "type": "numericunit", "unit": "€"} this will create and return a field {"id": "0123456789abcdef12345678", "label": "Total cost", "type": "numericunit", "unit": "€"}

Parameters

Argument 1 (processId, required): workflowId

Argument 2 (Process Field descriptor, required):

FieldTypeRequiredDescription
editablebooleannoEnables editing for function fields
placeholderstringnoPlaceholder text for label
descriptionstringnoDescription text for field
data(ObjectId | string)[]noList of allowable values for predefined options or process ids for linked activities
unitstringnoUnit - default to null (no unit)
defaultTobooleannoEnable default to given value in defaultValue
defaultValuestringnoDefault value for field if defaultTo is enabled
functionstringnoJavascript function code
functionEnabledbooleannoEnable function
functionVariablesRecord<string, object | object[]>no
reminderEnabledbooleannoEnable reminder
modifierobjectnofield type modifiers See below.
keystringnoField Key
reminderSettingsobjectnoSee below.
collapsedByDefaultbooleannoHides fields under subheader if enabled
labelstringyesField label
requiredbooleannoRequire field to be given - defaults to false Default: false.
typestringyesOne of: activitylink, country, date, daterange, datetime, datetimerange, numeric, numericunit, teams, text, textarea, textunit, textpredefinedoptions, time, timerange, users, linkedfrom, subheader.
inviteToDiscussionOnChangebooleannoOnly used for User fields. If true the user will be added to the activity discussion if they are not already in it. Default: false.

modifier (object):

FieldTypeRequiredDescription
checkboxbooleanno
filebooleanno
linkbooleanno
activityFieldFiltersobject[]noSee below.
matchAllFieldFiltersbooleannoSet true if all activityFieldFilters must match
quickAddobjectnoSee below.

modifier.activityFieldFilters[] (object):

FieldTypeRequiredDescription
targetWorkflowIdprocessIdyesworkflowId
targetFieldIdfieldIdyesfieldId
sourceFieldIdstringno

modifier.quickAdd (object):

FieldTypeRequiredDescription
targetFieldIdfieldIdyesfieldId
fieldIdsfieldId[]no

reminderSettings (object):

FieldTypeRequiredDescription
usersObjectId[]noUsers to Remind
teamsObjectId[]noTeams to Remind
fieldsObjectId[]noUser/Team Fields to Remind
phasesObjectId[]noPhases where the reminder is active
activityOwnerbooleanyesShould we remind the activity owner
activityOwnerTeambooleanyesShould we remind the activity owner team
activityParticipantsbooleanyesShould we remind the activity discussion participants
reminderTextstringno
fieldOffsetobjectnoOffset to add to field dates for reminders See below.

reminderSettings.fieldOffset (object):

FieldTypeRequiredDescription
millisecondsnumberyesMilliseconds to add/subtract from offset
daysnumberyesDays to add/subtract from offset
monthsnumberyesMonths to add/subtract from offset
beforeOrAfterbefore | afteryes
startOrEndstart | endno

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.create_field', [
  '507f1f77bcf86cd799439011', // processId (required)
  {
    label: 'string', // Field label
    type: 'activitylink',
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
editablebooleannoEnables editing for function fields
placeholderstringnoPlaceholder text for label
descriptionstringnoDescription text for field
data(ObjectId | string)[]noList of allowable values for predefined options or process ids for linked activities
unitstringnoUnit - default to null (no unit)
defaultTobooleannoEnable default to given value in defaultValue
defaultValuestringnoDefault value for field if defaultTo is enabled
functionstringnoJavascript function code
functionEnabledbooleannoEnable function
functionVariablesRecord<string, object | object[]>no
reminderEnabledbooleannoEnable reminder
modifierobjectnofield type modifiers See below.
keystringnoField Key
reminderSettingsobjectnoSee below.
collapsedByDefaultbooleannoHides fields under subheader if enabled
labelstringyesField label
requiredbooleannoRequire field to be given - defaults to false Default: false.
typestringyesOne of: activitylink, country, date, daterange, datetime, datetimerange, numeric, numericunit, teams, text, textarea, textunit, textpredefinedoptions, time, timerange, users, linkedfrom, subheader.
inviteToDiscussionOnChangebooleannoOnly used for User fields. If true the user will be added to the activity discussion if they are not already in it. Default: false.
_idObjectIdyes
uidObjectIdyes
createdtimestampyesTime (milliseconds since 1970-01-01 UTC)
updatedtimestampnoTime (milliseconds since 1970-01-01 UTC)

modifier (object):

FieldTypeRequiredDescription
checkboxbooleanno
filebooleanno
linkbooleanno
activityFieldFiltersobject[]noSee below.
matchAllFieldFiltersbooleannoSet true if all activityFieldFilters must match
quickAddobjectnoSee below.

modifier.activityFieldFilters[] (object):

FieldTypeRequiredDescription
targetWorkflowIdprocessIdyesworkflowId
targetFieldIdfieldIdyesfieldId
sourceFieldIdstringno

modifier.quickAdd (object):

FieldTypeRequiredDescription
targetFieldIdfieldIdyesfieldId
fieldIdsfieldId[]no

reminderSettings (object):

FieldTypeRequiredDescription
usersObjectId[]noUsers to Remind
teamsObjectId[]noTeams to Remind
fieldsObjectId[]noUser/Team Fields to Remind
phasesObjectId[]noPhases where the reminder is active
activityOwnerbooleanyesShould we remind the activity owner
activityOwnerTeambooleanyesShould we remind the activity owner team
activityParticipantsbooleanyesShould we remind the activity discussion participants
reminderTextstringno
fieldOffsetobjectnoOffset to add to field dates for reminders See below.

reminderSettings.fieldOffset (object):

FieldTypeRequiredDescription
millisecondsnumberyesMilliseconds to add/subtract from offset
daysnumberyesDays to add/subtract from offset
monthsnumberyesMonths to add/subtract from offset
beforeOrAfterbefore | afteryes
startOrEndstart | endno

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.delete_docTemplateField ​

Description

Delete field inside template.fieldMap under documentTemplates.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
processIdObjectIdyesProcess Id
namestringyesTemplate name
groupimages | activityLinks | fieldsyesGroup inside template.fieldMap (images, activityLinks or fields
keystringyesKey for field. e.g: field1, field2 or image1

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.delete_docTemplateField', [
  {
    processId: '507f1f77bcf86cd799439011', // Process Id
    name: 'string', // Template name
    group: 'images', // Group inside template.fieldMap (images, activityLinks or fields
    key: 'string', // Key for field. e.g: field1, field2 or image1
  },
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.get_next_prefix_id ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required):

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.get_next_prefix_id', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

FieldTypeRequiredDescription
latestSuffixnumberyes

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.install_template ​

Description

Install template to current network

Parameters

Argument 1 (ObjectId, required):

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.install_template', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

HailerResult

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.list ​

Description

List workflow/dataset information. Can be used to determine required/non-required fields for a given phase, or if not supplied with a phaseId then it can be used to give insight into the entire workflow. Will only work for a workflow or dataset which the active user has access to.

Parameters

Argument 1 (processId \| string, optional): valid process id or key

Argument 2 (ObjectId, optional): phase id to filter by, or workspace id when resolving a process key

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.list', [
  '507f1f77bcf86cd799439011', // valid process id or key
  '507f1f77bcf86cd799439011', // ObjectId
]);
console.log(result);

Returns

Array of any.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.list_templates ​

Description

List available templates

Parameters

Undocumented

This endpoint declares no argument schema in the source yet.

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.list_templates', []);
console.log(result);

Returns

Array of objects:

FieldTypeRequiredDescription
_idObjectIdyes
titlestringyes
descriptionstringyes
schemasanyyes

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.remove ​

Description

Standard function for removing a workflow or dataset, provided the user has the appropriate permissions.

Parameters

Argument 1 (ObjectId, required): Valid processId

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.remove', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

boolean

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.remove_field ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (processId, required): workflowId

Argument 2 (fieldId, required): fieldId

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.remove_field', [
  '507f1f77bcf86cd799439011', // processId (required)
  '507f1f77bcf86cd799439011', // fieldId (required)
]);
console.log(result);

Returns

boolean

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.set_docTemplateFieldProperty ​

Description

Set field property for template under documentTemplates.

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
processIdObjectIdyesProcess Id
namestringyesName of template
groupfieldMap | images | activityLinks | fields | optsyesGroup inside template where property belongs to
keystringyesKey
propertystringyesProperty to update One of: label, value, description, field, process, staticActivityIds, formatFieldValue, thousandSeparator, decimalSeparator, toFixedDigits, toFixedIds, linkedActivitiesFilteredPhases.
valuestring | boolean | numbernoValue/data for property

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.set_docTemplateFieldProperty', [
  {
    processId: '507f1f77bcf86cd799439011', // Process Id
    name: 'string', // Name of template
    group: 'fieldMap', // Group inside template where property belongs to
    key: 'string', // Key
    property: 'label', // Property to update
  },
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.set_docTemplatePrintName ​

Description

Update documentTemplate print name.

Parameters

Argument 1 (ObjectId, required): ProcessId

Argument 2 (ObjectId, required): TemplateId

Argument 3 (string, required): Print name

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.set_docTemplatePrintName', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  '507f1f77bcf86cd799439011', // ObjectId (required)
  'string', // Print name (required)
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.set_documentTemplate ​

Description

Create, update and remove one documentTemplate.

Parameters

Argument 1 (ObjectId, required): ProcessId

Argument 2 (Object containing one document template. If it only contains the name, template will be deleted., required):

FieldTypeRequiredDescription
templateIdObjectIdno
namestringno
ordernumberno
fieldMapobjectnoSee below.
optsobjectnoSee below.

fieldMap (object):

FieldTypeRequiredDescription
staticActivityIdsstringno
imagesRecord<string, object>noSee below.
activityLinksRecord<string, object>noSee below.
fieldsRecord<string, object>noSee below.

fieldMap.images.* (object):

FieldTypeRequiredDescription
valuestringno
descriptionstringno

fieldMap.activityLinks.* (object):

FieldTypeRequiredDescription
labelstringno
processstringno
fieldstringno
descriptionstringno

fieldMap.fields.* (object):

FieldTypeRequiredDescription
valuestringno
labelstringno
descriptionstringno

opts (object):

FieldTypeRequiredDescription
formatFieldValuebooleanno
thousandSeparatorstringno
decimalSeparatorstringno
toFixedDigitsstringno
toFixedIdsstringno
linkedActivitiesFilteredPhasesstringno
useRenderedActivitybooleanno

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.set_documentTemplate', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  {
    templateId: '507f1f77bcf86cd799439011',
    name: 'string',
  },
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.set_documentTemplates ​

Description

Create, update and remove documentTemplates.

Parameters

Argument 1 (ObjectId, required): ProcessId

Argument 2 (DocumentTemplates, Record<string, object>, optional): Object containing all document templates. If NULL, all templates will be deleted.

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.set_documentTemplates', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  {
    '507f1f77bcf86cd799439012': {
      templateId: '507f1f77bcf86cd799439011',
      name: 'string',
    }, // fieldId: value
  },
]);
console.log(result);

Returns

Undocumented

The return value is not described in the source yet.

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.set_info ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (ObjectId, required):

Argument 2 (object, required):

FieldTypeRequiredDescription
coverImageObjectIdno
createNewLabelstringno
descriptionstring | string[]no
defaultViewstringno
translationsRecord<fi | en | sv, object>noSchema for process translations See below.
enableAddedFieldbooleanno
enableAttachmentsbooleanno
enableLinkedAnnouncementsbooleanno
enableMapLocationbooleanno
enableMessengerbooleanno
allowGuestsbooleanno
enableGuestEditingbooleanno
enableModifiedFieldbooleanno
enableOwnerFieldbooleanno
enableBallTrackingbooleanno
enableOwnerTeamFieldbooleanno
ownerTeamFieldTitlestringno
enablePredefinedNamebooleanno
enablePreselectedTeambooleanno
enableUniqueNamebooleanno
enableUnlinkedModebooleanno
fieldsOrderObjectId[]no
initPhaseDescriptionstringno
locationRequiredbooleanno
namestringno
nameColumnTextstringno
nameFieldPlaceHolderTextstringno
nameFunctionEnabledbooleanno
nameFunctionVariablesRecord<string, object | object[]>no
nameFunctionstringno
nameEditablebooleanno
orderintegerno
membersobject[]noSee below.
personInChargeObjectIdno
personInChargeLabelstringno
phasesobjectno
phasesOrderObjectId[]no
phasesRemovedObjectId[]no
predefinedNamePrefixstringno
preselectedTeamobjectnoSee below.
tagsObjectId[]no
allowMultipleTagsbooleanno
allowCustomTagsbooleanno
requireFileTagbooleanno
defaultGroupByFieldObjectIdno
colorstringno
createdActivitiesnumberno
discussionPermissionsarrayno
inviteActivityCreatorbooleanno
groupNamesstring[]no
enableActivityTaggingbooleanno
activityTaggingPhaseIdsanyno
autoPickPreselectedTeambooleannoDetermines if the sidenav automatically picks a team if no preselected team are set
keystringnoProcess key

translations.* (object):

FieldTypeRequiredDescription
namestringno
fieldsRecord<fieldId, object>noSee below.
nameFieldPlaceHolderTextstringno
phasesRecord<phaseId, object>noSee below.
descriptionstringno
nameColumnTextstringno
predefinedNamePrefixstringno
createNewLabelstringno
personInChargeLabelstringno
initPhaseDescriptionstringno
ownerTeamFieldTitlestringno

translations.*.fields.* (object):

FieldTypeRequiredDescription
labelstringno
unitstringno
placeholderstringno
descriptionstringno
defaultValuestringno

translations.*.phases.* (object):

FieldTypeRequiredDescription
namestringno
descriptionstringno
possibleNextPhaseSettingsRecord<string, object>noSee below.

translations.*.phases.*.possibleNextPhaseSettings.* (object):

FieldTypeRequiredDescription
textstringno

members[] (object):

FieldTypeRequiredDescription
idstringnonetwork_<networkId>, team_<teamId>, user_<userId>, group_<groupId>
infoobjectno
permissions(admin | own | ownteam | any | edit)[]no

preselectedTeam (object):

FieldTypeRequiredDescription
accountObjectIdyesaccountId
teamObjectIdyesteamId

Argument 3 (fi` \| `en` \| `sv, optional):

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.set_info', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  {
    coverImage: '507f1f77bcf86cd799439011',
    createNewLabel: 'string',
  },
  'fi', // argument 3
]);
console.log(result);

Returns

boolean

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

process.update_field ​

Description

When called, will attempt to update the desired Field in the indicated Workflow (processId) according to the provided updateObject. The function will take all information given in the updateObject

If the user lacks the appropriate permissions, this call will fail. Similarly, if the fieldId and processId are mismatched, in that the field is not used in that workflow, it will return a failure response.

Parameters

Argument 1 (processId, required): workflowId

Argument 2 (fieldId, required): fieldId

Argument 3 (Process Field descriptor, required):

FieldTypeRequiredDescription
labelstringnoField label
requiredbooleannoRequire field to be given - defaults to false
editablebooleannoEnables editing for function fields
placeholderstringnoPlaceholder text for label
descriptionstringnoDescription text for field
data(ObjectId | string)[]noList of allowable values for predefined options or process ids for linked activities
unitstringnoUnit - default to null (no unit)
defaultTobooleannoEnable default to given value in defaultValue
defaultValuestringnoDefault value for field if defaultTo is enabled
functionstringnoJavascript function code
functionEnabledbooleannoEnable function
functionVariablesRecord<string, object | object[]>no
reminderEnabledbooleannoEnable reminder
modifierobjectnofield type modifiers See below.
keystringnoField Key
reminderSettingsobjectnoSee below.
inviteToDiscussionOnChangebooleannoOnly used for User fields. If true the user will be added to the activity discussion if they are not already in it.
collapsedByDefaultbooleannoHides fields under subheader if enabled

modifier (object):

FieldTypeRequiredDescription
checkboxbooleanno
filebooleanno
linkbooleanno
activityFieldFiltersobject[]noSee below.
matchAllFieldFiltersbooleannoSet true if all activityFieldFilters must match
quickAddobjectnoSee below.

modifier.activityFieldFilters[] (object):

FieldTypeRequiredDescription
targetWorkflowIdprocessIdyesworkflowId
targetFieldIdfieldIdyesfieldId
sourceFieldIdstringno

modifier.quickAdd (object):

FieldTypeRequiredDescription
targetFieldIdfieldIdyesfieldId
fieldIdsfieldId[]no

reminderSettings (object):

FieldTypeRequiredDescription
usersObjectId[]noUsers to Remind
teamsObjectId[]noTeams to Remind
fieldsObjectId[]noUser/Team Fields to Remind
phasesObjectId[]noPhases where the reminder is active
activityOwnerbooleanyesShould we remind the activity owner
activityOwnerTeambooleanyesShould we remind the activity owner team
activityParticipantsbooleanyesShould we remind the activity discussion participants
reminderTextstringno
fieldOffsetobjectnoOffset to add to field dates for reminders See below.

reminderSettings.fieldOffset (object):

FieldTypeRequiredDescription
millisecondsnumberyesMilliseconds to add/subtract from offset
daysnumberyesDays to add/subtract from offset
monthsnumberyesMonths to add/subtract from offset
beforeOrAfterbefore | afteryes
startOrEndstart | endno

Argument 4 (fi` \| `en` \| `sv, optional):

Example

javascript
const { Client } = require('@hailer/cli');

const client = await Client.create({
  host: 'https://api.hailer.com',
  username: 'you@example.com',
  password: '••••••',
});

const result = await client.request('process.update_field', [
  '507f1f77bcf86cd799439011', // processId (required)
  '507f1f77bcf86cd799439011', // fieldId (required)
  {
    label: 'string', // Field label
    required: false, // Require field to be given - defaults to `false`
  },
  'fi', // argument 4
]);
console.log(result);

Returns

boolean

Auth: requires an authenticated session.

Errors: on failure returns the standard Hailer error object { code, msg, details?, retryAfter?, debug? }. retryAfter is a delay in milliseconds.

Hailer Developer Documentation · v1.8.0