Creating and editing workflows
- 4 minutes to read
When you configure a personalization process for a product, you need to create a workflow. It is described in a workflow file in the JSON format.
Note
If you have some experience in integrating Customer's Canvas into your site, then you have already interacted with workflows and the UI Framework JS library. To learn more, read the What is UI Framework article.
In this article, you'll learn how to create and manipulate workflow files in Customer's Canvas and consider a workflow editor.
Creating a workflow file
In Customer's Canvas, you can work with your products using two approaches: The Product Information Management and Product Specifications. Read the corresponding sections: PIM Module and Product specifications to learn more about each approach.
If you want to add the PIM module or Product Specification in your tenant, contact our support team.
According to the approach you use, let's consider how to work with workflows. These descriptions are divided into two paragraphs for the PIM module and Product Specification.
Managing workflows for the PIM module
Opening workflow manager
To create a workflow file, navigate to the corresponding section and click Workflow/Pipelines. This section is divided into two parts: Personalization workflow and Processing pipeline.
Editing a workflow
To edit a workflow file, right-click the ellipsis and select Edit. A workflow file is opened in the same browser tab.
Creating a new workflow from scratch
To create a new workflow file, click the Create new button and select Personalization workflow. Then, choose your starting point. If you select New blank workflow, you'll describe a workflow from scratch. It opens in the same tab. You can see the blank editor and input the name of a new workflow file. Press Shift + S or the Save button to save the changes.
Duplicating a workflow file
To create a copy of a workflow file, select a workflow file, click the ellipsis and select Duplicate. A copy of this file appears.
Renaming a workflow file
To rename a workflow file, click the ellipsis and select Edit. In the Name text box, rename a file and click Save.
Deleting a workflow file
To delete a workflow file, click the ellipsis and select Delete.
Connecting and testing a workflow
You can read the Creating products article about the process of connecting a workflow file to a product. Then, read about Testing product links to test a workflow.
Managing workflows for Product Specification
Opening workflow manager
In the Workflows for Product Specification, you can see a file manager for manipulating workflow files. There are two folders: Standard and Custom.
In the Standard folder, you can see the default workflow files. They have restrictions for manipulating. You can only copy them to the Custom folder to create your own workflow file based on a default one. In the Custom folder, you can create your own workflow files and manipulate them as assets.
Let's consider how you can manipulate files in both folders.
Manipulating workflows in the Standard folder
In the Standard folder, you can see default workflows. You can only download and open these workflow files.
If you want to change something in a default workflow file, you need to copy this file to the Custom folder and edit the new workflow file.
Manipulating workflows in the Custom folder
In the Custom folder, you can manipulate files as assets: download, upload, delete, copy, move, rename, and create from scratch. To learn more, read the manipulating assets section. Let's see some typical examples for workflow files.
Creating a new file
To create a new file, click the New button > Workflow, or right-click anywhere on a blank space in the file list of the current folder and select Workflow. A blank workflow editor will be opened.
Editing a workflow file
To edit a workflow file, double-click the item or right-click and select Edit. A workflow file opens in a new window.
Connecting and testing a workflow
Before connecting a workflow to a product, you need to make a permission for this. Go to the Custom folder, right-click a file and select Properties. Then, click Actions and select Enable test.
To connect a workflow file to a product in Product Specification, read the Blank Print Product Editor article.
Workflow editor overview
This is a workflow editor. You can write JSON code there, or just paste it and save the result.
In the Name text box, you can rename the file. In the Type drop-down list box, you can select what item you'll create a workflow file for. It can be UI Framework, Simple Editor, or Design Editor.
Hotkeys
Let's consider the full list of functions, which are implemented by hotkeys.
Key | Description |
---|---|
Alt+Arrows | Move the caret up/down/left/right between fields |
Ctrl+Shift+Arrow Up/Down | Select multiple fields |
Shift+Alt+Arrows | Move current field or selected fields up/down/left/right |
Ctrl+Del, Del | Remove field |
Ctrl+Enter | Open link when on a field containing an URL |
Ctrl+Ins | Insert a new field with type auto |
Ctrl+Shift+Ins | Append a new field with type auto |
Ctrl+E | Expand or collapse field |
Alt+End | Move the caret to the last field |
Ctrl+F | Find |
F3, Ctrl+G | Find next |
Shift+F3, Ctrl+Shift+G | Find previous |
Alt+Home | Move the caret to the first field |
Ctrl+Z | Undo last action |
Ctrl+Shift+Z | Redo |
Now that you know where to find workflow files, let's take a look at their typical structure in the Structure article.