Help with Service Catalog notifications

LMHoffman
Kilo Expert

Hi everyone, I hope someone can help this newbie administrator

We're working on configuring our Service Catalog and I'm trying to customize an email notification. Am running into roadblock.

We have configured our Service Catalog to allow users to input a Requested For when they being their order. Field populates with the person who logs into ServiceNow, but can be changed via the lookup.

SC with Req For.png

The workflow when the order is submitted sets the approval to 'Approved' at which point the item is created. That form is configured -

RITM form.png

I'm using the Approval Request notification and have mimicked the information in the message from the template the notification was tied to OOTB.

I renamed Short Description to Item Requested, then added the Requested For, Quantity, Price, Recurring Price and Recurring Price Frequency using the same variable structure that was in the change.itil.approve.role template.

To get the field names for Price, Recurring Price and Recurring Price Frequency, I temporarily added the fields to the Requested Item form, then removed them

All of the fields below are pulling in the information with the exception of the Requested For. No matter how I put that variable in, the generated email leaves it blank.

I have tried -

  • ${sysapproval.requested_for}
  • ${sysapproval.request.requested_for}
  • ${sc_req_item.request.requested_for}

Here is a copy of the Message field of my notification with my most recent attempt:

Message body.png




Sample of the email received:

SNow,

The Service Desk has received an order for the following and we need your approval to proceed -

Item Requested: Hotspot

Requested for:

Quantity: 1

Price: $199.99

Recurring Price: $40.00

Recurring Price Frequency: Monthly

To approve or reject this request, click

For additional details about this request, click

As always, appreciate any help!

1 ACCEPTED SOLUTION

LMHoffman
Kilo Expert

Hi all,



Received info from ServiceNow to set the variable as ${sysapproval.request.requested_for} and that seems to have done the trick. We had tried that before ever posting here and didn't get favorable results but it's working now.


View solution in original post

13 REPLIES 13

Deepak Ingale1
Mega Sage

if you are configuring notification on sc_req_item table then you can add


${request.requested_for.name}


LMHoffman
Kilo Expert

Thanks for the reply Deepak!



The Approval Request notification shows the table as sysapproval_approver. I tried using ${request.requested_for} and ${request.requested_for.name}, and neither pulls the name in.



Any other ideas?


Hello Leah,


If you are sending notifcations from sysapproval_approver table, then include below expresssion



${document_id.requested_for.getDisplayValue()}



find_real_file.png



I have accessed 'approving' field (field name is 'document_id') and did dot walk to requested_for field on it.


This is the usual logic to add these expressions.



Kindly try this and let me know if it works


LMHoffman
Kilo Expert

Hi Deepak, still not working.



Being new to all of this, I guess I'm not understanding how all of this ties together. Using ${sysapproval.short_description}, ${sysapproval.quantity}, ${sysapproval.price}, ${sysapproval.recurring_price} all pull in the correct information, so where is the information really coming from?   What are these variables doing?



Very new to this, and have no scripting experience