Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Create request from Email

SunitS
Mega Contributor

Hello Team,

 

I want to understand how Request can be raised via Email in Servicenow. Is this the preferred OOB method to raise request?

1 REPLY 1

Keshav07
Mega Guru

Hi @SunitS ,

 

You can configure the Inbound Email Action as given below

Keshav07_0-1715606309234.png

 

In the Actions Related list give the script given below

(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {

    var cart = new sn_sc.CartJS(); 
    var request = {
        'sysparm_id': "SysID of the catalog item",
        'sysparm_quantity': '1', 
    };
    var orderCart = cart.orderNow(request); 

})(current, event, email, logger, classifier);

 

In the "sysparm_id", give the sys_id of your catalog item. For example :

'sysparm_id': "ec80c13297968d1021983d1e6253af32".
 
If you find this helpful, Mark it as helpful.
 
Thank you!