Creating and sending user instructions
To create a user instruction
- 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. - 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. - To restrict the user instruction to one incoming mailbox, select a mailbox from the Mailbox Name list.
- 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
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.
- Create a new email message in your mail tool.
- Address the email message to the incoming mailbox.
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: UrgentThe email should include any values for the variables if any variables exist in the template associated with the user instruction.
- 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
After receiving an incoming email, the Email Engineprocesses a user instruction as follows:
- Retrieves the associated user instruction entry from the AR System Email User Instruction Templates form and determines which template is associated with the instruction.
- Retrieves the associated template from the AR System Email Templates form.
- Replaces the variables in the template with the values defined by the information in the email.
- 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:
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:
- Match the string between exclamation marks in the email with the variable name in the template.
- Retrieve the database name or field ID between the exclamation marks in the template.
- Substitute the field with that database name with the value sent in the email.