The CreatorCon Call for Content is officially open! Get started here.

Service Portal Requests to be created with Contact-type 'self-service'

Rajkumar Sakthi
Kilo Expert

Hi

We wish to have the requests which are created through service portal, with contact-type - 'self-service'

For Incidents we have a Record Producer and managed through its RP script.

But I dont find a way to log RITMs.

Should I include a variable to all my catalog items, make it hidden and capture the window type through onLoad catalog client script for updating my record in the table.

Is there a better way than this.? Please comment.

1 ACCEPTED SOLUTION

Rajkumar Sakthi
Kilo Expert

I got the solution from Hi Support. Below is the BR(before) that needs to be put against 'sc_request' table.

(function executeRule(current, previous /*null when async*/) {


	var action = gs.action.getGlideURI().toString();
	
	if (action.indexOf('service_catalog.do') == -1)
		current.contact_type = 'self-service';
	
})(current, previous);

Hope this helps.

View solution in original post

3 REPLIES 3

sachin_namjoshi
Kilo Patron
Kilo Patron

Write a before insert business rule on sc_req_item table and and set the default value of the contact type

 

Regards,

Sachin

Hi Sachin,

 

BR will log all RITMs as self-service right.?

Even for that case putting the default value for the field in dictionary also could help as you suggested.

We wish to differentiate them by their requested method. Meaning requests logged thorugh SP alone must be with contact-type- 'self-service'. Others would  be thorugh UI and SD agent would select the appropriate value like phone, chat, email etc.,

Rajkumar Sakthi
Kilo Expert

I got the solution from Hi Support. Below is the BR(before) that needs to be put against 'sc_request' table.

(function executeRule(current, previous /*null when async*/) {


	var action = gs.action.getGlideURI().toString();
	
	if (action.indexOf('service_catalog.do') == -1)
		current.contact_type = 'self-service';
	
})(current, previous);

Hope this helps.