CA Service Management

  • 1.  Please help - needs codes for e-mail templates

    Posted Oct 30, 2015 06:12 AM

    Dear community members
    I am reaching out for your help and expertise. I am creating a new e-mail template and needs to add some fields I have never before used and therefore I can not copy these from another template.


    How can I find the codes for the following "placeholders"?

    • [Affected End User - User ID]
    • [Affected End User - First Name]
    • [Affected End User - Middle Name]
    • [Affected End User - Last Name]
    • [Affected End User - Phone number]
    • [Affected End User - Functional Organization]
    • [Affected End User - Department]
    • [Affected End User - Location]
    • [Request Area]
    • [User filled Category Propery field] (ex. account number when ordering a new smart phone...)
    • [Latest text from "User description" in a "Research" Activity]

     

    Thanks in advance
    Peter



  • 2.  Re: Please help - needs codes for e-mail templates

    Posted Oct 30, 2015 11:42 AM

    Hi Peter,

     

    The message template codes use dotted notation, if you are familiar with the mdb structure it is pretty easy to determine how to structure your codes.  Maybe with the exception of the Activity Log and Properties, not sure how to do those.

     

    Assuming these notifications are triggered from R/I/P record types you can use the codes below.

     

    Edit: Fixed a few of the codes, you need to use the object layer instead of the database layer

    • [Affected End User - User ID] - @{call_req_id.customer.userid}
    • [Affected End User - First Name] - @{call_req_id.customer.first_name}
    • [Affected End User - Middle Name] - @{call_req_id.customer.middle_name}
    • [Affected End User - Last Name] - @{call_req_id.customer.last_name}
    • [Affected End User - Phone number] - @{call_req_id.customer.phone_number}
    • [Affected End User - Functional Organization] @{call_req_id.customer.organization.name}
    • [Affected End User - Department] @{call_req_id.customer.dept.name}
    • [Affected End User - Location] @{call_req_id.customer.location.name}
    • [Request Area] - @{call_req_id.category.sym}
    • [User filled Category Propery field] (ex. account number when ordering a new smart phone...)
    • [Latest text from "User description" in a "Research" Activity]


  • 3.  Re: Please help - needs codes for e-mail templates

    Posted Nov 01, 2015 06:22 PM

    [Latest text from "User description" in a "Research" Activity] - @{description}

     

    asuming that your notification is triggered by research activity

    [User filled Category Propery field] - {call_req_id.properties.x.label}:@{call_req_id.properties.x.value}

    e.g. for the first property: {call_req_id.properties.0.label}:@{call_req_id.properties.0.value}



  • 4.  Re: Please help - needs codes for e-mail templates

    Posted Nov 02, 2015 04:07 AM

    Hi Gutis!

    Thank You very much for Your additions to "gbruneau's" reply.

     

    If our workflow is as described below, would Your proposal still be valid?

     

    Workflow after "Research":

    We want to use research field as a place to leave a comment, when an order has been fullfilled. Then we would like CA SDM to send an e-mail to our economics department with billing information. Our Analysts would some times have comments to add to an order. Today Analysts leave their comments on a printed (like in: "with a pen on real paper"...) copy of the ticket. I would like this process to be electronic!

     

     

    1. Analyst enters a "Research comment".
    2. Analyst marks ticket as resolved and leaves a "log comment"
    3. "Resolve Log Comment" is used in e-mail, sent to the end user, explaining which meassures has been done to resolve his/her ticket.
    4. "Research Comment" is used in e-mail, sent to economics department.

     

    Best regards,

    Peter



  • 5.  Re: Please help - needs codes for e-mail templates
    Best Answer

    Posted Nov 02, 2015 02:59 PM

    4 is not possible out of the box, here you have two options:

    For both of them you will need custom field of string type on request e.g zcustcomment so you can access it in email template as @{call_req_id.zcustcomment}

    1 option - create trigger that on research comment insert will run spell code that will populate zcustcomment field with the description.

    2 option - you need to modify researc form to grab the content of description field and set it to custom field using hidden input

    Personaly i prefer first option since it will not cause any problems during migration to next version




  • 6.  Re: Please help - needs codes for e-mail templates

    Posted Nov 02, 2015 04:00 AM

    Thank You very much, gbruneau.

    Could You please let me know how You obtained the informations? Is it to be found in a manual, can I enter a command via terminal on the SDM server?

    Best regards,

    Peter



  • 7.  Re: Please help - needs codes for e-mail templates

    Posted Nov 02, 2015 10:23 AM

    Hi Peter,

     

    I learned by reviewing the out of the box templates and checking the attributes for each object.  From command line you can run bop_sinfo -d Call_Req to see all attributes for R/I/P.  These can easily be linked to other tables as well.. For example here's one that I've just added to our production.  The following will list the Outage Start Time followed by the Timezone of the Analyst logging the incident.

     

    @{call_req_id.outage_start_time} @{call_req_id.assignee.location.timezone.sym}

     

    Customer/Assignee belong to the CNT object, so if you wanted to see what attributes are available there run bop_sinfo -d CNT.  Location is an attribute of CNT so I connected that as well and then Timezone and then sym.  So you can see how everything is logically connected to each other. 



  • 8.  Re: Please help - needs codes for e-mail templates

    Posted Nov 03, 2015 02:50 AM

    Thank you guys for the great and fulfilling answers. You are awesome!

    Best regards,

    Peter