Skip to content

Process ​

Workflow (process) configuration: metadata, copying, members, permissions, public forms, and translations.

Endpoints ​

EndpointArgumentsReturns
v2.process.copyunknownprocessId[]
v2.process.getprocessIdobject
v2.process.member.addObjectId, unknownboolean
v2.process.member.listObjectIdobject[]
v2.process.member.removeObjectId, unknownboolean
v2.process.metaoptionsobject
v2.process.permissions.denyObjectId, unknown, unknownboolean
v2.process.permissions.grantObjectId, unknown, unknownunknown
v2.process.publicForm.createoptionsobject
v2.process.publicForm.updateoptionsobject
v2.process.starObjectIdobject
v2.process.translation.createprocessId, unknownobject
v2.process.validateFunctionunknown, unknownunknown
v2.process.validateFunctionsWorkspaceIdunknown

v2.process.copy ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (processId \| processId[], required): One or many processIds to copy

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('v2.process.copy', [
  '507f1f77bcf86cd799439011', // One or many processIds to copy (required)
]);
console.log(result);

Returns

Array of processId.

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.

v2.process.get ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (processId, optional): workflowId

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('v2.process.get', [
  '507f1f77bcf86cd799439011', // processId
]);
console.log(result);

Returns

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
discussionPermissionsarrayno
inviteActivityCreatorbooleanno
groupNamesstring[]no
enableActivityTaggingbooleanno
activityTaggingPhaseIdsanyno
autoPickPreselectedTeambooleannoDetermines if the sidenav automatically picks a team if no preselected team are set
keystringnoProcess key
_idprocessIdyesProcess Id
uiduserIdyesProcess creator user id
cidWorkspaceIdyesProcess network id
createdtimestampyesTimestamp of when the process was created
updatedtimestampyesTimestamp of when the process was updated
fieldsRecord<string, object>yesProcess fields See below.
isStarredbooleanyesTrue when current client has starred the process
createdActivitiesnumbernoAmount of activities created in the process
publicFormobjectnoProcess public form See below.
documentTemplatesRecord<string, object>noProcess Document Templates See below.

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

fields.* (object):

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
createdtimestampnoTime (milliseconds since 1970-01-01 UTC)
updatedtimestampnoTime (milliseconds since 1970-01-01 UTC)
uiduserIdnouserId

fields.*.modifier (object):

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

fields.*.modifier.activityFieldFilters[] (object):

FieldTypeRequiredDescription
targetWorkflowIdprocessIdyesworkflowId
targetFieldIdfieldIdyesfieldId
sourceFieldIdstringno

fields.*.modifier.quickAdd (object):

FieldTypeRequiredDescription
targetFieldIdfieldIdyesfieldId
fieldIdsfieldId[]no

fields.*.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.

fields.*.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

publicForm (object):

FieldTypeRequiredDescription
keystringyesPublic form key
creatoruserIdyesPublic form creator id
team_accountobjectyesPublic form team See below.
followersstringyesPublic form followers
activebooleanyesPublic form active state
enableMessagingbooleanno
allowReadbooleanyesAllow listing activities in activity fields
themeobjectnoTheme information containing colors and logo for form See below.

publicForm.team_account (object):

FieldTypeRequiredDescription
accountObjectIdyesaccountId
teamObjectIdyesteamId

publicForm.theme (object):

FieldTypeRequiredDescription
foregroundColorstringyesHex color value
backgroundColorstringyesHex color value
complementaryColorstringyesHex color value
textColorstringyesHex color value
headerColorstringyesHex color value
logoIdfileIdnofileId

documentTemplates.* (object):

FieldTypeRequiredDescription
templateIdObjectIdno
namestringno
ordernumberno
fieldMapobjectnoSee below.
optsobjectnoSee below.

documentTemplates.*.fieldMap (object):

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

documentTemplates.*.fieldMap.images.* (object):

FieldTypeRequiredDescription
valuestringno
descriptionstringno

documentTemplates.*.fieldMap.activityLinks.* (object):

FieldTypeRequiredDescription
labelstringno
processstringno
fieldstringno
descriptionstringno

documentTemplates.*.fieldMap.fields.* (object):

FieldTypeRequiredDescription
valuestringno
labelstringno
descriptionstringno

documentTemplates.*.opts (object):

FieldTypeRequiredDescription
formatFieldValuebooleanno
thousandSeparatorstringno
decimalSeparatorstringno
toFixedDigitsstringno
toFixedIdsstringno
linkedActivitiesFilteredPhasesstringno
useRenderedActivitybooleanno

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.

v2.process.member.add ​

Description

Add member to process.

Parameters

Argument 1 (ObjectId, required): Process Id

Argument 2 (string, required): Network / User / Team / Group

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('v2.process.member.add', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  'string', // Network / User / Team / Group (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.

v2.process.member.list ​

Description

List permissions

Parameters

Argument 1 (ObjectId, required): Process Id

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('v2.process.member.list', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

Array of objects:

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

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.

v2.process.member.remove ​

Description

Remove member of process.

Parameters

Argument 1 (ObjectId, required): Process Id

Argument 2 (string, required): User / Team

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('v2.process.member.remove', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  'string', // User / Team (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.

v2.process.meta ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (object, optional):

FieldTypeRequiredDescription
processObjectIdyesProcess Id
searchstringnoOptional Search String

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('v2.process.meta', [
  {
    process: '507f1f77bcf86cd799439011', // Process Id
  },
]);
console.log(result);

Returns

Record<string, object>

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.

v2.process.permissions.deny ​

Description

Deny permission to Process for User / Team.

Parameters

Argument 1 (ObjectId, required): Process Id

Argument 2 (string, required): User / Team

Argument 3 (admin` \| `any` \| `own` \| `ownteam, optional): Permission

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('v2.process.permissions.deny', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  'string', // User / Team (required)
  'admin', // Permission
]);
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.

v2.process.permissions.grant ​

Description

Grant permission to Process for User / Team.

Parameters

Argument 1 (ObjectId, required): Process Id

Argument 2 (string, required): User / Team

Argument 3 (admin` \| `any` \| `own` \| `ownteam, optional): Permission

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('v2.process.permissions.grant', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
  'string', // User / Team (required)
  'admin', // Permission
]);
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.

v2.process.publicForm.create ​

Description

Generate process/dataset form key endpoint. If endpoint already exist, it will be replaced with new form key

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
processIdObjectIdyesProcess Id
creatorstringnoCreator (User Id)
teamstringnoTeam Id
accountstringnoAccount Id
followersnone | creator | teamnoValid attributes are none, creator or team
activebooleannotrue or false, defaults to true
enableMessagingbooleannoEnable public form user to anonymously take part in the discussion
themeobjectnoTheme information containing colors and logo for form See below.

theme (object):

FieldTypeRequiredDescription
foregroundColorstringyesHex color value
backgroundColorstringyesHex color value
complementaryColorstringyesHex color value
textColorstringyesHex color value
headerColorstringyesHex color value
logoIdfileIdnofileId

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('v2.process.publicForm.create', [
  {
    processId: '507f1f77bcf86cd799439011', // Process Id
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
keystringyesPublic form key
creatoruserIdyesPublic form creator id
team_accountobjectyesPublic form team See below.
followersstringyesPublic form followers
activebooleanyesPublic form active state
enableMessagingbooleanno
allowReadbooleanyesAllow listing activities in activity fields
themeobjectnoTheme information containing colors and logo for form See below.

team_account (object):

FieldTypeRequiredDescription
accountObjectIdyesaccountId
teamObjectIdyesteamId

theme (object):

FieldTypeRequiredDescription
foregroundColorstringyesHex color value
backgroundColorstringyesHex color value
complementaryColorstringyesHex color value
textColorstringyesHex color value
headerColorstringyesHex color value
logoIdfileIdnofileId

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.

v2.process.publicForm.update ​

Description

Update process/dataset form key endpoint. Form key will not be replaced

Parameters

Argument 1 (object, required):

FieldTypeRequiredDescription
processIdObjectIdyesProcess Id
creatorstringnoCreator (User Id)
teamstringnoTeam Id
accountstringnoAccount Id
followersnone | creator | teamnoValid attributes are none, creator or team
activebooleannotrue or false
allowReadbooleannotrue or false
enableMessagingbooleannotrue or false, enable public form user to anonymously take part in the discussion
themeobjectnoTheme information containing colors and logo for form See below.

theme (object):

FieldTypeRequiredDescription
foregroundColorstringyesHex color value
backgroundColorstringyesHex color value
complementaryColorstringyesHex color value
textColorstringyesHex color value
headerColorstringyesHex color value
logoIdfileIdnofileId

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('v2.process.publicForm.update', [
  {
    processId: '507f1f77bcf86cd799439011', // Process Id
  },
]);
console.log(result);

Returns

FieldTypeRequiredDescription
keystringyesPublic form key
creatoruserIdyesPublic form creator id
team_accountobjectyesPublic form team See below.
followersstringyesPublic form followers
activebooleanyesPublic form active state
enableMessagingbooleanno
allowReadbooleanyesAllow listing activities in activity fields
themeobjectnoTheme information containing colors and logo for form See below.

team_account (object):

FieldTypeRequiredDescription
accountObjectIdyesaccountId
teamObjectIdyesteamId

theme (object):

FieldTypeRequiredDescription
foregroundColorstringyesHex color value
backgroundColorstringyesHex color value
complementaryColorstringyesHex color value
textColorstringyesHex color value
headerColorstringyesHex color value
logoIdfileIdnofileId

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.

v2.process.star ​

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('v2.process.star', [
  '507f1f77bcf86cd799439011', // ObjectId (required)
]);
console.log(result);

Returns

FieldTypeRequiredDescription
isStarredbooleanyes

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.

v2.process.translation.create ​

Description

Creates a new translation from the default network language

Parameters

Argument 1 (processId, required): workflowId

Argument 2 (fi` \| `en` \| `sv, required): ISO code of new language to be created

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('v2.process.translation.create', [
  '507f1f77bcf86cd799439011', // processId (required)
  'fi', // ISO code of new language to be created (required)
]);
console.log(result);

Returns

Record<fi\|en\|sv, object>

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.

v2.process.validateFunction ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (string, required): Function Body

Argument 2 (string[], 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('v2.process.validateFunction', [
  'string', // Function Body (required)
  ['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.

v2.process.validateFunctions ​

Description

Undocumented

This endpoint has no description in the source yet.

Parameters

Argument 1 (WorkspaceId, required): workspaceId (former networkId)

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('v2.process.validateFunctions', [
  '507f1f77bcf86cd799439011', // WorkspaceId (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.

Hailer Developer Documentation · v1.8.0