After you have created a new document message, you can upload an existing .docx file to create your automated document. We’ve broken down this process into a few key steps.
- Upload your document
- Insert variables
- Applying rules
- Edit content in-app via the Word editor
- Edit content in Microsoft Word via Export
- Change your document name (optional)
- Test your document
- Set document expiry (optional)
- Connect to DocuSign (optional)
1. Upload your document
You must upload a .docx file that is less than 10MB.
You can drag and drop your file into the Upload document pop-up, or use the Choose file button to select from your local files. Once the upload is complete, select the purple Edit document button. A new tab will then open with the Word editor.
Your uploaded document will appear as editable blocks of text in the Word editor. Your styling is saved, but only certain elements appear in the Word editor.
- Note: Before you upload your document, please ensure it is a .docx file, not a .doc (Microsoft Word 97 - 2004 document) file type. Any older Microsoft Word file types need to be converted into .docx files before uploading them to Josef.
2. Insert variables
To insert a variable into your document, place the cursor where you want the user response (i.e. the variable) to appear. Next, click Insert response in the purple toolbar.
Select the relevant message name, click Insert, and it will then appear in your document in purple text.
Only variables connected to your bot's conversation flow can be inserted into your document.
Inserting file uploads
When you select a file upload variable to insert into your document, you can choose whether to display the file as a link or an attachment.
Image files (limited to .png and .jpg) uploaded by a user can be displayed as either links or as embedded images positioned inline within your document.
Document files (limited to .docx) can also be displayed as links, or attached to your document as an appendix.
To attach a document as an appendix, simply insert the variable at the end of your document. A .docx file uploaded by your users that is inserted as an attachment will be appended to the end of your document.
All other file types will be displayed as links in your document.
3. Applying rules
Rules determine whether blocks or lines of text appear in your bot's generated document.
In this section, we'll outline how to:
- Select the text you wish to automate via rules
- Apply rules
- Apply the All/Any toggle
- Edit and delete rules
Select the text you wish to automate
You can do this by selecting individual characters or words, or by selecting entire blocks.
- To select Individual characters or words, highlight the text and select Add rule in the top toolbar.
- To select entire blocks (denoted by their pale purple border), click on the block and select Add block rule button in the top toolbar. The border will turn dark purple once selected.
To apply the same rule(s) to multiple blocks, highlight them all at once and follow the same step as above.
Apply rules
Once you have selected the block or text,
- Click the Add rule button in the purple toolbar. A purple sidebar will appear.
- Press Add rule to determine when the text will appear.
- Input the relevant automations:
- Variable
- Operation
- Value
Example
If a user expresses that the term of an agreement is greater than two years, the related clause in the document would contain the following rules.
- Variable (i.e. the Message name): Term in years
- Operation: is greater than
- Value: 2
When you’re done, click out of the sidebar. It'll save automatically!
The rule will be highlighted in blue once the rule has been applied. To edit, click the text/block and select Edit text/block rule in the top toolbar.
Applying multiple rules
You can add as many rules as you like to the text. To do this, just click the Add rule button again. If you do create more than one rule in the same connection, you will need to be aware of how the All/Any toggle works (see below).
- Note: Ensure you're using the correct Operation with each new rule added.
Applying rule groups
You can also apply rule groups where two or more rules need to be satisfied for the logic to be applied.
To do so, after creating a rule, select Add group rather than Add rule in the sidebar. The group will expand and you will be able to add the rules that you would like to be met, in the same way as detailed above. Be mindful of the All/Any toggle!
For ease of reference, you can rename your group. Simply click on the name of the group rule in the top left of the sidebar (e.g. Group 1) to edit the text.
Apply the All/Any toggle
The All/Any toggle appears at the top of the rules sidebar.
If you have created more than one rule and you select Any, the related text/block will appear if any of those rules are met.
By selecting All, all rules will need to be met in order for the related text/block to appear in your document.
It’s like using “And” or “Or” in a Boolean search when you’re doing legal research.
Edit and delete rules
Click on the text highlighted in blue. Select Edit text/block rule in the top toolbar. Here you can edit, add or delete rules, if necessary.
Note: Text with rules applied can also be edited. Simply click on the text in your document and type as you normally would. Navigate your mouse elsewhere once complete.
4. Edit content in-app via the Word editor
Once you have uploaded your document, there are two ways you can edit it.
- Within the Josef Word editor
- By exporting the document and making changes within Microsoft Word
Here's an overview of what's possible in the Word editor.
Add text
Navigate to the relevant block and type in the new text.
Delete or duplicate blocks
Select the block and click either duplicate or delete via the floating toolbar on the left.
Re-order blocks
To re-order text blocks:
- Select the block
- Press the up or down icons in the floating toolbar on the left
Text formats
Use the formatting toolbar in the top-right, you can embolden, underline or italicise sections of text. The usual keyboard shortcuts (e.g. Ctrl + B) are also options.
Format painter tool
To copy the formatting (e.g. font size, colour, etc.) of one block onto another, use the Format painter tool.
- Click on the block with the pre-existing formatting
- Click on the Format painter tool in the top-left
- Click on the block you wish to apply the formatting onto. Done!
Looping
If you've used looping logic in your bot, you can insert looped variables into your document. Learn how.
Unsupported content
Certain types of content (e.g. cross-references & images, etc) do not display in the Word editor or are uneditable. We call this unsupported content that instead displays as grey, locked blocks.
While such content does not display as expected in the Josef Word editor, it displays normally in your bot's final generated document.
To learn more about how to edit this content, check out this article.
5. Edit content in Microsoft Word via Export
If you want to make substantial formatting changes to your document, we recommend
- Exporting your document
- Making any edits in Microsoft Word
- Re-uploading the document to Josef
The re-uploaded document will retain any previously applied rules, variables and loops. No need to re-automate!
Learn how to export & re-upload documents.
6. Change your document name (optional)
[GIF: A document title being renamed in the top Word editor toolbar]
Once you have uploaded your document to the Word editor, you can change the document name by navigating to the top left and clicking on the title.
Once clicked, a highlighted text field will appear. Here you can insert a new title and hit enter on your keyboard to confirm.
The document name can be changed however many times you like.
7. Test your document
Builders can test their documents in a few ways.
If you'd like to make any changes to your document upon testing, please see steps 4 and 5 for guidance. Otherwise, here are a few other ways to test.
Via Export
This is suited for making format edits (as per step 5), or if you want to see how and where variables, loops & rules are placed in your document.
Prior to launch, switch the toggle in the top right of the Word editor to either MS Word or PDF.
In the comment section of Word exports, you'll find all the variables & rules applied to your document.
PDF exports do not include such comments, however, they do feature the variables populating your document.
Via Preview
If your document is located in an External document message, you can test how it generates via Preview. Here's how.
- Navigate back to the bot's building environment
- Select Preview in the bottom left-hand corner
- Interact with your bot
- Download your document via the bot UI
Via Launch
Any documents located in Internal document messages can be tested by temporarily launching your bot. This will involve interacting with the bot and then downloading the document from the Activity tab.
- Note: Ensure any sensitive Notifications have been switched off prior to testing! This method involves interacting with the live version of your bot, so be careful.
8. Set document expiry (optional)
Builders can also set an expiry period for generated document links.
To apply this to a document,
- Open the relevant document message via either List view or Flowchart.
- Click Edit document in the Edit message sidebar to open the document in the Word editor.
- Click Settings in the top right.
- Under Document access, switch the toggle on.
[Image: Builder enabling Expires after 45 days]
Once enabled, all links generated for the document will expire 45 days after the document is downloaded the first time. It will also apply to previously downloaded documents within the bot.
This feature is only available for documents generated using our Word editor.
9. Connect to DocuSign (optional)
Josef's DocuSign integration allows builders to automate the signing of documents.
Builders can
- Automatically send DocuSign envelopes directly to recipients
- Add signature blocks, date stamps and initial blocks
- Pre-configure the required number of recipients
–
Got a question? Contact us at support@joseflegal.com.