So I am finally coming to the end of a piece of work I am doing for one of our contracts and there was a genuine need to mandate a phrase at the beginning of every email from the Service Desk and also include the signature block of the user sending the email. Whilst the solution to doing this wasn’t exactly rocket-science, I thought it might save one of you guys the trouble if I posted my solution:
Mandated Subject Line:
So the first challenge was to mandate a phrase in the subject line. So by way of an example, let’s say that you wanted to make sure that the subject of every email sent by any staff member, started with “Service Desk Notification:” What I did was to create a simple client-side business rule (CSBR).
Conditions
On Data Change – <Any Field> | |||
Expression 1 | Comparison Operator | Expression 2 | Logical Operator |
---|---|---|---|
{SUBSTR,1,26,{TR,Subject} SS} | NotEqual | Service Desk Notification: | None |
Actions
Method | Module | Form |
---|---|---|
Populate Current Form | Email Conversation | Email Conversation |
Field Name | Value |
---|---|
Subject | Service Desk Notification: {TR,Subject} |
So basically, when ever a field is changed on the form (handles when a user doesn’t bother entering a subject), the rule checks to see if the first 26 characters of the new subject is “Service Desk Notification:”. If it is not then the rule appends the new subject to the words, “Service Desk Notification:”
Signature Blocks:
The second challenge was to automatically insert the signature block of the user sending the email using a standard IS Service signature block. The solution to this was a lot easier than I had imagined. I created another CSBR:
Conditions
On Save | |||
Expression 1 | Comparison Operator | Expression 2 | Logical Operator |
---|---|---|---|
Actions
Method | Module | Form |
---|---|---|
Populate Current Form | Email Conversation | Email Conversation |
Field Name | Value |
---|---|
Body | {TR,Body}
Regards, {DB,Support Staff,Full Name,”Login ID” = ‘{MAGICUSER}’ DB} You can track the progress of any of your tickets by visiting our Self-Service portal (http://servicedesk) and clicking on the link to My Tickets. |
On save, the rule essentially goes and gets all the details from the Support Staff table for the user sending the email ({MAGICUSER}) and creates and appends the signature block.
And that was it.