Custom Prompts: Tailored for Your Documents

Doc Auto Team
Doc Auto Team
  • Updated

In certain situations, documents require data points that are not natively stored in Athennian (eg. director remuneration), or information that varies each time you generate certain documents (eg. loan amount). Custom prompts allow users to answer a question at the time of document generation to populate the information based on the answer.

Setting Up Custom Prompts

Custom prompts require "set-up" in two places:

Coding Custom Prompts in Document

  1. Determine the parameters of your custom prompt. This is what you will use to add the prompt into the Template Manager:
    • Create a variable name that does not contain spaces
      • Consider using camel case for consistency with other variable names
      • Best Practice 💡 Tip: Add CP to the end of your variable name to easily identify it in your document, and for easy find and replace if changes need to be made (eg. {paymentMethodCP})
    • Decide on the question users will answer
    • Decide how the users will answer the question (multiple choice? true/false? fill in the blank?) and provide answers to select from if necessary.
  2. Use your custom prompt in your coding.

Template Manager Settings

  1. Go to the settings of the document you would like to add a custom prompt to and click “Prompt.”
    Screen_Shot_2021-09-23_at_3.49.55_PM.png

  2. The Custom Prompt pop up will give you the option to choose a pre-existing custom prompt or to create a new one. Click “New” to create a new prompt.
    Screen_Shot_2021-09-23_at_3.50.18_PM.png
  3. Insert the new variable name.

    Screen_Shot_2021-09-23_at_3.53.58_PM.png

  4. Type your question in the question box. If there are specific instructions for the user at the time of document generation, feel free to include that here as well (eg. If the dollar value should be entered in a specific format, add that instruction: "Please enter the amount in 0.00 format.").
    Screen_Shot_2021-09-23_at_3.54.58_PM.png
  5. Choose a fill type and, if applicable, provide the corresponding choices for users to select.

  6. Once your prompt has been created, select it to add it to your template settings.

Fill Types

Text Fill: "Multiple Choice"

Text Fill will provide the user with a multiple choice question. Use the choices tab to provide the choices.

The Answer box will be what the user sees while the Fill Text will be the output in the document.

Screen_Shot_2021-09-23_at_4.40.13_PM.png

User View at the time of document generation:

Screen_Shot_2021-09-23_at_4.45.01_PM.png

True/False

True/False provides the user with boolean choices. You can provide more than 2 choices, however the output will only be true or false.

Screen_Shot_2021-09-23_at_3.55.24_PM.png

User view at the time of document generation:

Screen_Shot_2021-09-23_at_4.33.14_PM.png

User Fill: "Fill in the Blank"

User Fill will provide the user with a freetype text box. The output will be exactly what the user types into the box.

Screen_Shot_2021-09-29_at_11.11.50_AM.png

User view at the time of document generation:

Screen_Shot_2021-09-29_at_11.12.32_AM.png

Coding Custom Prompts

Custom prompts can be used in a variety of different ways depending on the output of the prompt.

As a Variable

You can use the custom prompt as a simple variable.

User Fill

Sample Custom Prompts Settings

Variable: {assemblerInitialsCP}

Fill Type: User Fill

Question: Please insert the assembler initials.

User Response JPA
Input The assembler's initials are {assemblerInitialsCP}.
Output The assembler's initials are JPA.

Text Fill

Sample Custom Prompt Settings

Variable: {paymentTypeCP}

Fill Type: Text Fill

Question: How will payment be made?

Option 1 - Cash (cash)
Option 2 - Promissory Note (promissory note)

User Response

Cash

Input

The type of payment is {paymentTypeCP}.

Output

The type of payment is cash.
 

With Logic

You can also use custom prompts with logic. Based on the choice the user selects at document generation, we can determine the appropriate conditional content that appears. For more information on logic, check out the article on Logic & Conditions.

True/False

Sample Custom Prompt Settings

Variable name: {assemblerExists}

Fill Type: True/False

Question: Does an assembler exist?

Option 1 - Yes (true)
Option 2 - No (false)

User Response

Yes

Input

{#assemblerExists==true}There is an assembler{/}{#assemblerExists!=true}There are no assemblers{/}.

Output

There is an assembler.