Automate simple forms, motions, and letters entirely within A2J Author.
Prior to this version of A2J Author, an A2J Guided Interview was a front end interface for collecting answers from an end user and storing them in an answer file. This new version of A2J Author allows authors that want to generate a document from their A2J Guided Interview to do so without additional software tools. A2J Author is now an end to end solution for document automation.
The A2J Author Document Assembly Tool (A2J DAT) is intended for use in creating simple templates for document automation. This allows authors to just use A2J Author when they want to create letters, simple motions, and basic court forms. The A2J DAT has a rich text editor, supports repeat loops, provides space for custom headers and footers, has page breaks and section titles, and allows for basic IF/ELSE commands.
The process for creating a fully automated document within A2J Author now requires an author to create an A2J Guided Interview and a Template. The Template contains the formatting, text, and variables required to generate a complete document.
We've added an additional tab to the tool bar within A2J Author - the Templates Tab. This is where you will create your templates for use within an A2J Guided Interview.
Templates Tab - Introduction
The Templates Tab is only accessible when an author has an A2J Guided Interview open. To open a Guided Interview, go to the Interview Tab and either double click on `Blank Interview` under Create a new interview or double click on the name of an existing Guided Interview under Edit one of my interviews. Once you have an A2J Guided Interview open, you can navigate to the Template tab on the navigation toolbar along the left side of the screen.
Template Tab
This Templates tab will show you all of the Templates associated with this Guided Interview. A single A2J Guided Interview can contain multiple templates that are assembled for the end user based on logic set by the authors. For example, a Guided Interview could contain a cover sheet template, a motion template, and a template for notice of service that will be generated for all end users. Additionally, it could contain a template for notifying a spouse of the motion if the end user says they are married or specific instructions on what to do next if the end user says they have children. The templates generated can contain logic that tells A2J Author to only assemble them when certain criteria are met.
Creating a Template
The first step is to create a new Template. To do so, click the New Template button.
This will take you into a blank Template. Here is where you will do the majority of your work on your Template.
Blank Template
There are several tools available to you to use in building your template. They are in the Template Design Sidebar to the right of the screen. The Template Design Sidebar includes the Add Elements tab and the Template Options tab. The Elements currently enabled in the A2J DAT are Rich Text, Section, Page Breaks, If/Else Logic, and Repeat Loop Logic.
Template Design Sidebar, Add Elements Tab.
The Template Design Sidebar also includes the Template Options. In the Templates Options tab, you can create a custom header and footer. You can also change the Template's font, font size, and add section numbering. Finally, you can add conditional logic that will tell A2J Author whether to assemble that particular template based on some variable. For example, if the A2J Guided Interview is for a protection order, you may need additional documents to print for the end user if they have minor children.
Template Options in Template Design Sidebar
To build a Template, you will need to add elements to it. Double click the Element that you want to add to the Template. A unique Element Editor will then display for each available Element.
Rich Text Editor
Rich Text Editor Element Added to Template
The above screenshot shows you what it looks like when an author adds the Rich Text Element to the Template. The Rich Text Editor allows you to add text and edit it. The options are fairly extensive. They include the ability to embolden, italicize, strike through, underline, add supra and subscripts, and insert block quotes. The Rich Text Editor allows you to add lists either numerically or with bullet points. You can also indent and outdent the text, hyperlink to external URLs, add checkboxes (both unchecked and checked), tables, and spell check it. You can add styles to chunks of your text, change the format, font type (options are specific to your browser), and font size. Most importantly for document assembly purposes, you can insert variables.
Inserting a Variable
To insert a variable, click the Variable Insert button .
It is located in the bottom row of the Rich Text Editor.
Insert variable button highlighted.
When you click the Variable Insert button, a field will display that allows you to start typing the name of a variable. It will offer variable name suggestions based on the characters that you have typed and how they match up to variables already present in your Variables Tab. When the variable you'd like inserted appears, you can click on it to insert it into the document.
Variable Insert Tool.
Variable Insert Tool with character based variable search shown.
This is what an inserted variable looks like. A variable is blue when it appears in the template. It will appear normally in the assembled document.
Inserted Variable in the Rich Text Editor.
You can format your inserted variable according to a number of styles.
Styles available for formatting a variable.
You can also leave notes for yourself or future developers in the box to the right of the Rich Text Editor. These will not assemble in the final document, but will only display within the A2J DAT authoring suite.
Notes Field in Rich Text Editor
Once you are finished with the Rich Text Editor, click the Save & Close button under the Notes Field to save that Element.
Section
The A2J DAT allows you to add in Sections.
The Section Element is available in the Add Elements Tab of the Template Design Sidebar.
Sections are similar to headings. They can be larger than the standard text and can be underlined.
Inserted Section Element
When you have the Section Element open, as seen in the screenshot above, you can duplicate it and delete it. Once you are done editing your Section Element, hit the Save & Close button in order to save your element.
Page Breaks
The A2J DAT allows you to add in Page Breaks. Page Breaks tell the PDF Generator where to end the current page and begin the next.
The Page Break Element is available in the Add Elements Tab of the Template Design Sidebar.
This can be useful if authors need to ensure that certain information is contained on certain pages and the length of the end user's answers are unknown. It also allows the author the ability to ensure the next Element starts on a new page.
Page break inserted into a Template.
The Page Break Element also lets you add notes about the element that can be useful for future developers. These notes are not part of the assembled document and will only be visible to authors viewing the Template within A2J Author Document Assembly Tool.
IF/ELSE
Authors can conditionally insert elements into their Template based on IF/ELSE logic. You can conditionally insert Rich Text, Repeat Loops, Section Breaks, and Page Breaks. To insert an IF/ELSE element, select the IF/ELSE option from the Add Element Tab of the Template Design Sidebar.
IF/ELSE element in the Template Design Sidebar.
Once the Element is added to the Template, you are able to add the variable upon which the conditional elements will be based.
IF/ELSE element added to the Template.
Just as in other areas of the A2J DAT, when you start typing a variable, the A2J DAT will automatically pull a list of all the variables that match the letters you have typed in. You can then select from that list.
Variable auto populating within the IF/ELSE conditional.
Your IF/ELSE conditional can be based on a variable of any type. You can set the condition to be based on whether a true/false variable is true or false, whether a variable equals or does not equal a value, or whether a variable is greater than or less than a value.
List of options for setting a variable within the IF/ELSE conditional element.
If you select “equals,” “does not equal,” “is greater than,” or “is less than” you can then add a variable or a value to be evaluated against that initial variable.
Space to add a variable or text value to be evaluated against an initial variable.
Finally, you can select whether you want to include an ELSE statement. Not every IF/ELSE conditional requires an else statement. You may choose to just have an IF component to your Template. If you check the “Else” box, an additional section will be added to the IF/ELSE element that will allow you to add Rich Text, Section Break, Page Break, or Repeat Loop.
Gif showing an ELSE section being added to an IF/ELSE Conditional.
Once you’ve set up the parameters upon which your elements will be conditionally inserted, click “Save & Close” to save the IF/ELSE Conditional.
You can now add the elements that you want to be conditionally inserted. You do this by clicking into the field where it says “add elements here…”. When you do, a dialog box with the available elements will appear.
“Add elements here…” section and the Add Elements Dialog.
To add an Element to either the IF or the ELSE part of your conditional, select the element by clicking on it. There is no limit to the number of elements that can be added conditionally. The Rich Text, Section Break, Page Break, and Repeat Loops work exactly the same way as they do outside of the conditional element, except that they are only inserted into the assembled document if the condition you set is met. Once you’ve finished adding elements to your IF and ELSE sections, make sure to hit the “Save & Close” button again.
Repeat Loops
The Repeat Loops element allows you to create chunks of text that are repeated in the assembled document based on either a number variable or a set number of times.
To add a Repeat Loop, select that element from the Add Element Tab of the Template Design Sidebar.
Repeat Loop Element in the Template Design Sidebar
Once you select the Repeat Loop element, the Repeat Loop options dialog will appear.
Inserted Repeat Loop Element.
Up close version of the Repeat Loop Options Dialog.
Within the Repeat Loop options dialog, you can add a title to your repeat loop section. The size of this title can be controlled by the Title Size field. The Title Size field allows you to choose from six different heading sizes, ranging from Heading 1 to Heading 6. Heading 1 is the largest and Heading 6 is the smallest.
The repeat loop can be repeatedly assembled in the finished document based on a set number of times or on a counting variable set within the A2J Guided Interview. If you choose to set it based on a set number of times, you must enter that number when creating the repeat loop. To set it to a counting variable (a variable used within an A2J Guided Interview to track how many times a user has been through a repeat loop of questions), select “For each variable” under “Repeat each:”. Then type in the counting variable that you would like to use. Just as in other areas of the A2J DAT, when you start typing a variable, the A2J DAT will automatically pull a list of all the variables that match the letters you have typed in. You can then select from that list.
Two options for setting how many times a repeat loop is assembled in the Template.
There are three options for how your repeat loop can appear in the assembled document. You can choose from a table, a list, or a text block.
Table
Repeat loop in a table with a border.
The repeat loop table can be bordered, condensed, or striped rows. Selecting “bordered” puts a faint border around the entire table, dividing each part from the others. Selecting “condensed” removes the borders, leaving just a faint dividing line between the column title and the repeated variable. Selecting “striped rows” is similar to “condensed”, but includes a colored block behind every other row in the table.
Repeat loop table with a condensed border.
Repeat loop table with striped rows.
By default, a repeat loop table will have 1 column at 100% of the allotted space. You can add columns and the A2J DAT will automatically size them proportionately. You can change the percentage of the space allotted manually though. There is no limit to the number of columns within a table. You can also delete any columns that you have added. Every repeat loop table must have at least 1 column though.
Gif showing how an author can add and delete the number of columns in a repeat loop table.
Finally, you can change the name of each column. By default, the columns are named “Column 1,” “Column 2,” etc. You can edit the name of the column or delete the name all together.
Now it is time to insert the variables you want to be repeated. Click into the field where the variable will go in the column. Begin typing the name of the variable that you want to insert. The A2J DAT will auto populate a list of variables that match the characters that you have typed.
Auto populated list of variables to insert into a repeat loop table.
It is important to note that only variables which have been designated as “repeated” (i.e. set to hold multiple values) are going to display in that list. You can check whether a variable is set to hold multiple values by going to the Variables Tab and clicking on the name of the variable. That will open the Variable Editing Window. Make sure the box is checked that says “Check if multiple values.”
Variable Editing Window with variable set to hold multiple values.
Once you have selected the border style, the number of columns for your table, added a name to the columns, and added the repeated variables, hit “Save & Close” to save your options.
List
The second option for formatting a repeat loop is to put the variables in a list.
Repeat loop in a list format.
The list can be set to repeat each item in one list or to repeat an entire list multiple times.
Text Block
The third option for formatting a repeat loop is to create a text block with repeated variables inside of it.
Repeat Loop text block option.
This option allows you to repeat a chunk of text based on a counting variable or for a set number of times, just like the other two options for repeat loops. With this option, you have full access to the rich text editor and can use the same text editing and formatting features that are available in a rich text element. As with every element, make sure to hit the “Save & Close” button to ensure your changes are saved.
Adding the Assemble Commands to Your A2J Guided Interview
There are two new destinations for you to send your end user. As a reminder, destinations are set via the buttons section of a question in the Question Design Window. The two new destinations are [Assemble - Generate PDF document] and [Assemble - Generate PDF and Process Form].
[Assemble - Generate PDF document] - when clicked, the user’s answer file will be combined with the A2J Templates in that A2J Guided Interview. A PDF file, potentially containing multiple documents, will download to the user’s local machine. The A2J Guided Interview window will remain open for the user. No user data will be transmitted to the hosting organization.
[Assemble - Generate PDF and Process Form] - generates the PDF file for the end user the same as [Assemble - Generate PDF document], but it also transmits the user’s data to a pre-set URL via a POST and closes the user’s browser window. This is similar to what happens with [Success - Process Form], except that a PDF file is generated for the user before their data is transferred.
Two new Assemble Commands.
To assemble a document for your end user, you need to add an Assemble command to the last question of your A2J Guided Interview. On the last question, you should have a button called something like “Get My Document”.
“Get My Document” button in Preview Mode.
On the “Get My Document” button, set the destination to either [Assemble - Generate PDF document] or [Assemble - Generate PDF and Process Form].
“Get My Document” button in the Question Design Window.
Saving The Template
It is important to periodically save your template. You can save your template by clicking on the “Save Template” button in the top right corner of the Template editing window.
Save Template button circled.
It is recommended that you save your template before you move to another tab within A2J Author, before you Test Assemble your Template, and before you close your browser window.
Test Assembling and Generating Your Document
When you are creating an A2J Template, it is important to test your template. To do this, you need to test assemble the template and look at the generated document. You can test assemble an A2J Template three ways. First, you can test assemble all of the A2J Templates within a given A2J Guided Interview from the Templates Tab. Second, you can test assemble all of the A2J Templates in an A2J Guided Interview from within Preview Mode. Finally, you can test assemble individual templates while editing them.
Assembling from Preview Mode
In order to test assemble from within your A2J Guided Interview in Preview Mode, you need to add an Assemble command as a destination in the buttons section of your final question. See the section above about how to add the Assemble Commands to your A2J Guided Interview.
Once you’ve added the Assemble command that you want, you can run through the A2J Guided Interview in Preview Mode. When you get to the final question, click “Get My Document” or whatever label you’ve assigned to that final button and generate your document based off the answer file you’ve created while running through the A2J Guided Interview in Preview Mode.
Assembling from the Templates Tab
In order to test assemble from the Templates Tab or from within the Template editor, you need to create an answer file for which the A2J DAT will generate a document.
Creating an Answer File to Test
To create an answer file, you need to run through your A2J Guided Interview in Preview Mode with the Variables/Script Window open.
Preview Mode with the Variables/Script Window open.
To open the Variables/Script Window, click the “Variables/Script” button at the bottom of the page when you are in Preview Mode.
Variables/Script button in Preview Mode.
Once you have run through all of the questions, or as far as you want to go to create an answer file, hit the “Save” button at the top of the Variables/Script Window. An answer file will download to your local machine. You can save it to a specific folder or rename it if you choose. The answer file that downloads will have a .anx extension.
Demonstration of how to save an answer file from within Preview Mode.
Test Assembling Individual Template
When you are working on an individual template, you will want to test assemble it independent of the other templates in your A2J Guided Interview. To do so, open the template that you want to test by selecting it from your list of templates in the Templates Tab and clicking on it.
List of templates in an A2J Guided Interview with 1 selected.
When you have the Template editing window open, click the “Test Assemble” button from the top right side of the screen.
Test Assemble button circled.
After you click the “Test Assemble” button, a dialog box will appear that allows you to load an answer file against which to test your template.
Load Answers button in Test Assemble dialog box.
If you click “Load Answers,” your computer’s file explorer will pop up. You can then navigate to the answer file that you want to use for the test assembly. Answer files created in A2J Author are saved as .anx files. See above for how to generate an answer file from Preview Mode.
Sample answer file in local computer’s file explorer.
When you navigate to the file that you want to use, click “Open”. The answer file will load into A2J Author. You then click “Get PDF” and the A2J Author PDF Generator will assemble your document. The document will download to your local machine and you can open it to review it.
Test Assembling All Templates in the Templates Tab
Test assembling all of your templates within a single A2J Guided Interview is similar to test assembling an individual template. Start by going to the Templates Tab. You must have an A2J Guided Interview open in order to access the Templates Tab. In the Template Tab, you will see a list of all of the A2J Templates associated with this A2J Guided Interview.
Click the “Test Assemble” button in the top right corner of the Templates Tab.
Test Assemble on Templates Tab circled.
After you click the “Test Assemble” button, a dialog box will appear that allows you to load an answer file against which to test your templates.
Remember, if you have an A2J Template setup with conditional logic that controls when it assembles, that logic will test against your answer file. For example, if you have a template that only assembles if the user has children (i.e. the variable [Has children TF] is true) and your answer file does not contain that variable or it is false, that template will not assemble.
Load answers button in the Test Assemble dialog box within the Templates Tab.
If you click “Load Answers,” your computer’s file explorer will pop up. You can then navigate to the answer file that you want to use for the test assembly. Answer files created in A2J Author are saved as .anx files. See above for how to generate an answer file from Preview Mode.
Sample answer file in local computer’s file explorer.
When you navigate to the file that you want to use, click “Open”. The answer file will load into A2J Author. You then click “Get PDF” and the A2J Author PDF Generator will assemble your documents. The documents will download to your local machine and you can open them to review it.
Conclusion
The A2J DAT is a work in progress. We are committed to adding new features and addressing any issues that arise. If you have any questions or would like to request a new feature, please email Jessica@cali.org.