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}

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}

To manage 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:

  1. Read the default template's templateUuid with Get Org Unit Default Workflow Template. Then find that template's workflows in List Org Unit Workflow Templates.
  2. Add the files with Create Project Resource.
  3. Send the template's workflows with each file in Create Work Units:
[{"projectResourceUuid": "<resource uuid>", "targetLocales": ["fr_fr", "de_de"], "workflows": ["TRANSLATION", "REVIEW"]}]