Using label-value pairs in templates
For the most part, email templates consist of a label/value pair surrounded by text or graphics, depending on the format of the template. The label is a keyword such as Action. The value consists of data or commands (for example, Submit). A value can be specified in the templates or obtained from the configuration information. The Email Engine is not case sensitive when parsing the labels. The following table lists valid labels; each label is discussed in more detail following the table.
Label/value pairs in templates
Label | Description | Incoming | Outgoing | Aliases |
---|---|---|---|---|
Form | The AR System form that the instruction will use. If no AR System form is specified or the specified form does not exist, the mail process verifies whether a default Workflow form was defined in the AR System Email Mailbox Configuration form. If not, the item is rejected because a form must be specified. The alias for this label is Schema. An example of a Form label/value pair is Form:formName. | Yes | No | Schema |
Server | The server that the instruction will affect. If no server is specified or the specified server does not exist, the mail process defaults to the server information specified in the EmailDaemon.properties file. An example of a Server label/value pair is Server:serverName. (For more information, see Updating the Email Engine settings by using the Centralized Configuration.) | Yes | No | |
Login Password | The user name and password used when executing the instruction. You can configure exactly how the user name is to be determined for an incoming email:
The passwords and security keys are encrypted in the AR System Email Messages form. The aliases for Login are User, User Name, Name, and Login Name. If you try to send an email in an HTML template, do not use a colon in the Login, Name, or Password labels. For example, do not use: | Yes | No | User User Name Name Login |
TCP Port | The TCP/IP port of the AR System server , if your AR System server is not using the Remedy AR System portmapper. The alias for TCP Port is TCP. | Yes | No | TCP |
RPC Number Authentication | The RPC number for the destination server (usually involved when the user is connecting to private queues) and the name of the external authentication service that is used to authenticate the user. These values are the same as those used when logging in to the AR System server . The alias for RPC Number is RPC. | Yes | No | RPC |
Language | The locale used when logging in to the AR System server . If no language is specified, the default values are used. The values are the same as they are in the Remedy Developer Studio and other Remedy AR System clients. The format of the Language label/value pair is Language: localeLanguage, for example, Language:en_US. | Yes | No | |
Action | Denotes the instruction to be executed. For more information, see Action label. | Yes | No | Instruction |
Format | The format of the information. For Query, Submit, and Modify actions, you can specify that requested information be formatted in full or short form by entering Full or Short after this keyword. An example of a Format label/value pair is Format:Full. The Full format lists the information for all accessible fields, with each entry separated by a line of hyphens. The Short format returns only the fields defined in the results list. If no fields are defined for the results list, it returns the Short Description field. In Submit and Modify actions, use only the Format label if the advanced configuration setting Reply with Entry is set to Yes for the incoming mailbox. For Query, the default format is Full. All matching requests are listed in the body of the response, one after another. | Yes | Yes | |
Qualification | Qualification for a query-based instruction. The Qualification label and its value are required only for a query-based instruction. The value can be any properly formatted search. All of the restrictions that apply to the Advanced Search bar in the mid tier apply when performed through email. A sample qualification string: Qualification: 'Source' = "Phone" OR 'Source' = "email" A null value will be treated as if it is a "return all records" query, such as 1 = 1. Aliases for this label are Query and Search. | Yes | No | Query Search |
Result Template | The name of the template to use in the reply (if the Email Engine is configured to send an email reply). The Result template is usually associated with a particular form. You include the Result Template label, and specify the template name as the value. The Result Template label defines the template to use when replying to an incoming email containing query instructions. This template consists of label/value pairs and variables (described on Using variables in email templates) that correspond to fields on the Remedy AR System form being queried. These variables are replaced by the data found on the form based on the instruction being executed. For example, you can include variables in your template that let users click a direct access URL to open a specific Request ID: <TD width="17%"><a href="http://polycarp/arsys/servlet/ ViewFormServlet?server=polycarp&form=HD+Incident&eid=#$$Request ID$$#">#$$Request ID$$#</a> </TD> Sample HTML result template illustrates how this variables is used in a result template. The value given for this Result Template label is the name or Request ID of the template contained in the AR System Email Template form. When the
Email Engine
receives this label and value, it retrieves the template file and uses it as required. Aliases for this label are Result and ResultTemplate. An example of a result template label/value pair is Result: resultTemplateName. | Yes | No | Result ResultTemplate |
Status Template | The name of the template to use when status information is returned. The template consists of label/value pairs and variables that are replaced with relevant data. These variables correspond to the status information returned if any errors occurred while executing one of the instructions; they make use of reserved words. (For more information, see Reserved variables.)
| Yes | No | Status StatusTemplate |
Header Template Footer Template | The templates used in the header and footer in the reply email. If the templates are used within a Query action block (that is, after an Action: Query label/value pair), the header or footer or both are inserted before or after (or both before and after) each entry that is retrieved when the action is executed. In this way, entries are clearly separated from each other. The Header and Footer templates typically contain basic text, or they can be HTML documents with logos, graphics, and decorative typefaces. The value given for this label is the name or Request ID of a template contained on the AR System Email Template form. When the Email Engine receives this label/value pair, it retrieves the template and uses it as required. The label/value pair method is used when requesting results from a server by way of email. Aliases for the Header Template are Header and HeaderTemplate; aliases for the Footer Template are Footer and FooterTemplate. An example of a header template label/value pair is HeaderTemplate:headerTemplateName. | No | Yes | Header HeaderTemplate |
!Name! or !ID! | The database name or ID of a AR System Form Field. The exclamation marks are required to surround the field name or the ID number. For example, field ID 8 is !8!. A colon (:) is placed after the second exclamation point as a delimiter, for example: !8! : Short description information Blanks are acceptable. If any characters other than digits and spaces are between the exclamation points, the reference is not recognized as a field ID. The argument to the ID/name label should be of the same data type as that of the field (data type information need not be included explicitly as the parser will determine the appropriate data type of the field by default). If this is a query action, and the argument is of a different data type than defined for this field, an error will be generated. Labels for fields need not be present in any specific order within an email message. You can precede the field name/ID label with any text that you want to include. This text will not be parsed by the Email Engine . It is common practice to include the actual field name in this way: Submitter !2!: $USER$ In the previous example, the Email Engine treats the text Submitter as regular text. The field ID !2! is parsed and the variable $USER$ is the value used for any submit or query action that might have been specified. Only fields that have values are used in the request. Fields that do not have values are ignored. To specify the Request ID for join forms, use the Request IDs of the forms referenced by the join form separated by a vertical bar. For example, a join form Request ID might appear as TT000567|TT000890. | Yes | Yes | |
Key | The key associated with a given sender or user. If your incoming mailbox is configured to require a security key, the Key label/value pair must be present in the incoming email message. A key is required to use the Modify action. The passwords and security keys are encrypted in the AR System Email Messages form. Aliases for the Key label are Encryption Key and Encryption. An example of a Key label/value pair is Key:testKey. For more information, see Validating permissions for incoming email actions with security keys. | Yes | No | Encryption Key Encryption |
Request ID | The Request ID of the entry on which the possible action must be executed. The Request ID label is valid only for the Modify action and defines the Request ID or Entry ID of an entry on the corresponding form against which the Modify action is to be executed. The Request ID is required for a Modify action as it serves to identify the specific form entry you want to modify. Aliases for the Request ID are Entry ID, EntryID, and RequestID. An example of a request ID label/value pair is RequestID:0000012345. | Yes | No | Entry ID EntryID RequestID |
Comments
Log in or register to comment.