How to use the Add-on for Google Docs™

This add-on allows you to insert "Merge Tags" into the document templates for use with Khaos Control Cloud. These Merge Tags are elements that will be replaced with the relevant data, depending on the Tag, when the final document is generated.

Definitions

Document: The current Google Docs™ document that you are editting.

Document Template: A template used within Khaos Control Cloud to control the layout of a report, email, etc.

Merge Tag: a text-based identifier code that is replaced by the related data when the document template is used to generate a report, email, etc in Khaos Control Cloud.

Displaying the Sidebar

To display the Khaos Control Cloud sidebar in Google Docs™, once you have installed the add-on, you will need to go to "Extensions" -> "KCC" and click on "Merge Tags".

How To Guide image 1

Inserting a Merge Tag

The first thing you will need to do is select the type of document you are editing in the drop-down within the sidebar. This will then give you all of the relevant Merge Tags for that document type.

To do this, simply click on the "Select Document Type" drop-down in the sidebar and click on the relevant document type for the template that you are editing.

How To Guide image 2

You will then be given a set of Tag groups to choose from, which group up releated Tags to make things easier to find. These groups can be expanded and collapsed as required by clicking on the group name.

How To Guide image 3

Once you have found the Merge Tag that you want to insert into the document, you just need to make sure the document cursor is in the position that you want to insert the Merge Tag, and then click on the Merge Tag in the sidebar to insert it.

NOTE: Some Merge Tags, such as the Stock tags, which are used to display multiple items must be placed in Table Cells or List items.

Formatting

There are a number of formatting options that can be added to Merge Tags to change how the data is displayed, these can be found in the "Formatting" section at the top of the sidebar, which can be displayed by clicking on it.

How To Guide image 4

To add a formatting option to a Merge Tag you will need to tick the checkbox next to the option you want to use, and then click on the Merge Tag to insert it into the document.

NOTE: Some of the formatting options have fields that you will need to manually set first, such as the "Replace" option which you would need to set the word to be replaced, and the word to replace it with, before you insert the Merge Tag.

Here is a brief explanation of each of the formatting options:

Check if Tag is set: Add a check around the Merge Tag so that it will only display if the Merge Tag has contents to show, if the Merge Tag is empty or "false" nothing will be displayed.

Check if Tag is > than "": Add a check around the Merge Tag so that it will only display if the contents are greater, less than, etc the number entered, if the Merge Tag contents is less than, greater, etc nothing will be displayed.

Check if size of Tag is greater than 0: Add a check around the Merge Tag so that it will only be displayed if the size of the contents is greater than 0. This can be used on arrays, such as the order items, to check that there are things to show.

Include ELSE option: Include an "else" option in the above check, so that an alternative element can be displayed if the check is "false".

Convert date to DD/MM/YYYY: Convert a date to the format of Day / Month / Year.

Remove time from date: Remove the time element of a date without otherwise affecting the format.

Convert to lower case: Convert text to lower case.

Replace "" with "": Replace all instances of the first word in the text with the second word.

Remove leading and trailing spaces: Remove any spaces at the start or end of a piece of text.

Wrap text after "" characters: Wrap text on to a new line after a set amount of characters.

Format number to "" decimal places: Format a number to display with a set amount of decimal places.