TBM allows to synchronize TBM and Language Cloud projects in a manual and (semi) automatic way, by leveraging WebHooks functionality provided by Language Cloud platform. This article contains 2 sections covering these types of synchronization.
If you have a project in TBM which is already linked with Language Cloud project, you can select it, and then click RWS - RWS Language Cloud - Sync project menu item. TBM will retrieve all tasks from a linked Language Cloud project, find matching translation jobs and assignments, and then display this data in user-friendly way using modal dialog, which looks like this:
Take a note that only tasks which are linked with TBM service types will be shown in this window. This means that before using syncing functionality you have to open Reference Data - Service types, and confirm that necessary service types are linked with Language Cloud task types.
List displayed in the main area contains records corresponding to each task-file-language combination. It allows to create separate jobs and assignments in TBM for individual files (to split files/assignments between different vendors). In the Assigned users column you can see user names who are currently assigned to Language Cloud tasks. TBM assignment tasks column contains blocks with information about tasks found in a TBM project. If this cell is empty in any row, then it means that corresponding task is not found (or does not exist).
Target action column allows to select one of the following actions:
- Do nothing. Record will be skipped (no actions will be performed for this Language Cloud task)
- Create new job and assignment in TBM. If matching job and assignment do not exist in TBM, they will be automatically created. TBM will import analysis and try to find matching vendor. If vendor is found, TBM will apply their prices and generate purchase order. If Language Cloud task status is processing, then assignment will also be switched to In work status.
- Link with existing task. If you have matching task in TBM but it is not linked with Language Cloud task, you can drag it from the right panel to the TBM assignment tasks column and establish this link.
- Assign in Language Cloud. If TBM assignment has different vendor than Language Cloud task, then you can update Language Cloud project by assigning different user based in a vendor selected in TBM.
- Assign in TBM. If TBM assignment has different vendor than Language Cloud task, then you can update TBM assignment by importing user selected in an Language Cloud task. TBM will apply new vendor prices and re-generate purchase order (older one will be deleted).
- Reload analysis data. If total wordcount differs from Language Cloud task total wordcount, then TBM will offer to re-load analysis.
If right panel displays any unlinked tasks, you can manually drag and drop them to the left table, or use Try to link automatically... button, so TBM attempts to find possible matching Language Cloud task automatically.
If Target action column defines job creation or analysis re-importing, please check Default analysis import settings field in the Options area at the bottom, because this set of settings will be used to automatically import data into jobs and assignments (analysis import dialog won't be displayed).
When you're ready, click Apply to go through the table and perform defined tasks. When operation is finished, TBM will reload data from the cloud and you will see updated information in this dialog. If everything is ok, you can close this window, otherwise you can specify more actions to perform and click Apply again.
Syncing using WebHooks
Language Cloud allows to send specific POST request to external application with a task is created or completed. You can configure it using Integrations page in your Language Cloud instance. See details here: https://languagecloud.sdl.com/Language Cloud/api-docs/5cc9374300b99-webhooks.
Default API endpoint which you can use to configure TBM to accept WebHooks from Language Cloud: https://Your.Instance/api/lc/processwebhook/tbm, where tbm at the end is the name of your tenant. If you use multi-tenancy, then please replace tbm with your tenant name. By configuring this URL using Integrations page of your Language Cloud instance, you enable auto-processing of incoming events in your TBM instance.
In the TBM instance, please open application settings, switch to the Integrations tab, and provide necessary Language Cloud connection data, including Language Cloud WebHooks secret key.
Currently, TBM supports 2 types of events: PROJECT.TASK.CREATED and PROJECT.TASK.COMPLETED.
When any of these events occurs, Language Cloud will send data to TBM, and TBM will immediately reply with OK response. After that, received event will be processed in the background, in the following order:
- For new tasks TBM will:
- search a project and create it if is missing;
- create necessary jobs and assignments;
- if LC task has a single assignee, this assignee will be selected in created assignment, then the system will calculate amounts and generate PO;
- if there is no assignee in LC task, TBM will search automatically applied vendor group and apply vendor from there, and then send API request to LC to assign that user;
- for all created projects, jobs and assignments, generate notifications using New project created, New job created and New assignment created templates (these templates are all disabled by default).
- For completed tasks, corresponding assignments and jobs will be marked Finished. If all project jobs and assignments are completed, project will also be marked as Finished.