In addition to inserting field values in templates, Athento allows you to define custom labels to print text strings or images. It is also possible to condition the printing of labels to intelligent rules. For example, if you have a contract template, you might want to include a clause in the contract only if the value of a field is X.
Step 1: Creating a custom tag
To create these custom labels you must access the "Templates" section of the form you are working with.
Enter the template by clicking on the template name.
Now go to the "Custom labels" tab.
Then use the "Add tag" button to create a new tag.
Athento will ask you for a name for your new label.
Click on Create and you will have your new label available to insert in your template. You can access the created tags from the Template Settings tab, below the field tags.
Custom tags work in exactly the same way as field tags: you will have to insert them in the template between {{}} (double braces).
Step 2: define when to insert the label and its content
You will see that in the Custom Tags tab, to the right of the new tag, you have the option to add resources and conditions.
The resources will be the contents of the labels that will be printed in the template, while the conditions will be the rules for inserting or not inserting a resource.
For each tag you must create at least one Resource-Condition pair for a tag to be able to insert a value in your template.
The same tag can insert different values in your template, depending on whether a condition is met.
If, on the other hand, you want your tag to always insert the same value, you will have to create the Resource-Condition pair, adding the resource but not a condition.
Click the Add button to define your first condition. Athento will ask you for a description. This will be useful when you have several Resource-Condition pairs for the same tag.
The content of the tag (the resource)
If you do not have any resource created, you can click on the Add resource button, which will allow you to create the resource.
To create a new resource you must specify a name and a type:
- Type Text: text string to be inserted in the document generated by the template.
- Type Image: Image (in ".jpg", ".jpeg" or ".png" format) to be inserted in the document generated by the template. You must upload the image with the specific dimensions for its use.
Once you select the type, you can enter its content.
In the case of the example, we want the Contact method tag you created, when printed in the template, to have the value "Contact center".
Click on create the resource and now select the resource from the dropdown. Finish by clicking on Create.
The rule to print the resource (the condition)
If your tag will always print the same resource, you don't need to define a condition. But if, for example, sometimes the Contact Method tag should insert Contact Center and sometimes you want it to insert the email value, you will have to add conditions. To add conditions, use the Add condition button.
You can use the values of your fields so that dynamically, Athento knows what value to paint in the template. In the example screenshot, we condition our resource that the value of a field is "Athento Standard".
Reusing resources
From the "Resources" tab you will be able to view, edit, delete and create the resources you are going to use in your labels. These resources are shared by all the templates in the form, so you will be able to use them in other templates than the one you are configuring. Outside this form, you will not be able to use those resources that have been specified. You must be careful when editing and deleting these resources, as you will affect all those templates that make use of them.
Related articles
How to generate documents from a template?
Using a Word or Excel template to generate documents
Comments
0 comments
Please sign in to leave a comment.