Create Service Request using inbound email action

Ravi Kiran
Kilo Guru

Hello,

 

I am trying to create service request using inbound email action , below script I tried but not working.

 

1st script -

var cart = new Cart();
cart.requested_for = gs.getUserID();
var item = cart.addItem('26a4d033dbbb3550454964ebd39619bd');
var details =   'Sender: ' + email.origemail + '\n\n';  
details += 'To: ' + email.direct + '\n\n';
if (email.copied) {   details += 'CC: ' + email.copied + '\n\n';}   details += 'Subject: ' + email.subject + '\n\n';
details += 'Body:\\n' + email.body_text;cart.setVariable(item, 'v_details', details);
var cartmsg = "received from: " + email.origemail + "\n\n" + email.body_text;
var rc = cart.placeOrder();
 
Issue facing- Ticket creates and directly move to Closed incomplete and notes updated as "This item was closed due to missing Service Request Flow." No short description and description updating, attachment also not updated.
 
Flow is already attached to catalog item (26a4d033dbbb3550454964ebd39619bd) , if i open from portal it working fine but with email action flow is not attached.
Thanks in advance. 
 
1 REPLY 1

Maik Skoddow
Tera Patron
Tera Patron

Please follow the instructions on https://www.youtube.com/watch?v=uLHCw2GA3lo&t=88s