Creating and sending user instructions


After storing your templates, you must associate a name with the User Instruction by creating an entry in the AR System User Instruction Templates form. The User Instruction name will be used as a value for the Action Label in the email the user sends to the incoming mailbox.

You can associate more than one user instruction with a template containing one or more instructions.

To create a user instruction

  1. In the Mid Tier, open the AR System User Instruction Templates form in New mode.
    Do not enter a template ID. The system will create the unique ID in the Instruction Template ID field when you save the entry.
  2. From the Template Name list, select the template that contains the actions you want to associate with the user instruction.
    You can use only templates that are stored in the AR System Email Templates form, for example, UrgentRequests. For more information, see Creating-and-storing-a-template-for-use-with-user-instructions.
  3. To restrict the user instruction to one incoming mailbox, select a mailbox from the Mailbox Name list.
  4. In the Instruction field, enter a character string value.
    This value is used to identify this template when used in an incoming email, for example, Urgent.
    Creating an entry using the User Instruction Template form
    23_3_AR_Mailbox_User_Instructions.png

To send a user instruction

All authorized users can send an email to the incoming mailbox of the Email Enginewith the name of the User Instruction as the value of the Action Label.

  1. Create a new email message in your mail tool.
  2. Address the email message to the incoming mailbox.
  3. Enter the user instruction in the email.
    The user instruction consists of an Action label and value equal to the string defined in the Instruction field in the AR System Email User Instruction Templates form (Urgent ). The power of customized user instructions is that your email could simply consist of the following text:

    Action: Urgent

    The email should include any values for the variables if any variables exist in the template associated with the user instruction.

  4. Send the email.

Results of the user instruction

Using the previous procedure as an example, the Email Enginewill retrieve all records of urgent requests from the AR System serverand list them in the email, as shown in the following figure:

The email response to a user instruction
response-urg.gif

After receiving an incoming email, the Email Engineprocesses a user instruction as follows:

  1. Retrieves the associated user instruction entry from the AR System Email User Instruction Templates form and determines which template is associated with the instruction.
  2. Retrieves the associated template from the AR System Email Templates form.
  3. Replaces the variables in the template with the values defined by the information in the email.
  4. Runs the template with substituted values in the incoming email.

Templates and user instructions make it easier for your users to interact with the Email Engine, not requiring them to learn the Email Enginesyntax. They can simply use the user instruction name as the value of the Action Label.

Using variables with user instructions

Variables are useful when you need to send different values for the fields to submit an entry. For example, you can create a user instruction that submits information into the User Instruction form. 

The user might send a user instruction in the following email:

Login:Frank Frontline
Password:mypassword
Action: Submit
!Employee_Name!: [$$Joe Smith$$]

The characters between the exclamation marks match the variable name in the template that is associated with the user instruction (Submit). The Email Enginewill then:

  1. Match the string between exclamation marks in the email with the variable name in the template.
  2. Retrieve the database name or field ID between the exclamation marks in the template.
  3. Substitute the field with that database name with the value sent in the email.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*