guides
Workflow steps and templates
A project's work units run through workflow steps, such as translation and review. The account keeps the catalog of steps. An org unit keeps workflow templates: named, ordered lists of steps that its projects reuse. This guide sets up both and then creates a project that uses them.
1. The step catalog
List Workflows returns the account's active steps in order. Add includeInactive=true to also get the inactive ones. Each step has a code, which is how templates and work units refer to it.
To add a step, use Create Workflow Step:
{"code": "LEGAL_REVIEW", "title": "Legal review", "editorEnabled": true}
codeis unique in the account. It is stored in upper case, with spaces and symbols turned into_.- Without
sequence, the step goes to the end of the active steps. With asequence, the steps from that position on move down one place. editorEnableddecides whether the step's tasks open in the editor.
Update Workflow Step changes only the fields you send. Reorder Workflow Steps moves several steps in one call. Set Workflow Step Active turns a step off or back on. A step that a template still uses cannot be turned off and returns 409, so remove it from those templates first. Renaming a code does not update the templates that use the old code.
These calls need the ACCOUNT_manage_workflows permission. Account admins have it.
2. The org unit's templates
List Org Unit Workflow Templates returns the templates an org unit can use: its own, and the ones it inherits from the account (inherited: true).
Create one with Create Org Unit Workflow Template:
{"client": "<org unit uuid>", "name": "Translation and review", "workflows": ["TRANSLATION", "REVIEW"], "defaultTemplate": true}
workflowslists step codes in the order they run. Each code must be an active step of the account.activedefaults totrue.defaultTemplate: truemakes this the org unit's default, which replaces any previous default.
To manage templates:
- Update Org Unit Workflow Template replaces a template's name, steps,
activeanddefaultTemplate. Send all of them. - Set Org Unit Default Workflow Template picks the default with
mode: TEMPLATEand atemplateUuid.mode: FILE_TYPEclears it. - Set Org Unit Workflow Template Active turns a template on or off for this org unit. For an inherited template, it changes only this org unit.
- Remove Org Unit Workflow Templates deletes the org unit's own templates.
Get Org Unit Default Workflow Template returns the default that is in effect. That is the org unit's own default, or else the account's. If neither exists, it returns FILE_TYPE.
These calls need ORG_UNIT_update on the org unit (ORG_UNIT_get_by_id to read).
3. A project from the org unit
Create the project with Create Project, setting orgUnitUUID and inferDefaultSettings=true:
POST /api/v3/project?inferDefaultSettings=true
{"reference": "ACME-2041", "orgUnitUUID": "<org unit uuid>", ...}
inferDefaultSettings=true applies the org unit's defaults to the project: its translation memories, its glossaries and its price list.
The template's steps are not added automatically. You add them when you create the work units:
- Read the default template's
templateUuidwith Get Org Unit Default Workflow Template. Then find that template'sworkflowsin List Org Unit Workflow Templates. - Add the files with Create Project Resource.
- Send the template's
workflowswith each file in Create Work Units:
[{"projectResourceUuid": "<resource uuid>", "targetLocales": ["fr_fr", "de_de"], "workflows": ["TRANSLATION", "REVIEW"]}]