Submit and close a catalog item request from inbound email

Alex Saager1
Tera Contributor

Hi there,

 

I would like to submit and automatically close a catalog item request from an inbound email.

 

The catalog item is very basic and only has one variable (description - multi-line text variable) and only visible for one team, the idea behind this is just logging a ticket for audit purposes.

 

What would be the best way to do this? I had a look at flow designer but could not see anyway to close the ticket all in one go, or would this be better done using an inbound email action and scripting?

 

Any help or guidance would be appreciated?

Many thanks,

Alex

9 REPLIES 9

 

Hi @Amit Verma 

 

Thank you for the above, so from the documentation you sent I've amended my script but still cannot get it to work, but that is possibly because of a an error in the script this is what I come up with:

var cart = new sn_sc.CartJS();
var request =
{
'sysparm_id': '65a26f1b47b7f950f42ad0e8736d43c8',
'sysparm_quantity': '1',
'variables':{
'description': 'email.body_text',
}
}
var cartDetails = cart.orderNow(request);
gs.info(cartDetails);

 

Kind regards,

Alex

Hi @Alex Saager1 

 

Just gave a closer look on your question. You want to close a request created on submission of a catalog item from an inbound email but as per the code you just shared, you are trying to submit a new request.

 

Can you please share your exact requirement ?

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hi @Amit Verma 

 

Ideally yes, so basically all I want to do is capture information on an email into a ticket, I managed to do this with flow designer into an incident but it was brought to my attention that "technically" this is not an incident.

 

So I've created a catalog item with one variable (description) and all I need to do is have the email come in, copy the email body to that variable and then close the task, ritm req etc.

 

Hope this is clearer and appreciate your help on this.

 

Kind regards,

 

Alex

Hi @Alex Saager1 

 

This could be easily achieved through a flow itself. Please follow below steps :

 

1. Create a flow with Inbound Email as a trigger. You could add some trigger conditions like trigger flow for only New Inbound emails.

 

AmitVerma_0-1706097694579.png

 

2. Make use of Submit Catalog Item Request Action to submit your catalog item. Map the incoming email body to the multi line text variable and requested for as the sender of the email.

 

AmitVerma_1-1706097774476.png

 

3. Make use of Update Record action on the RITM and the REQ to close them.

 

AmitVerma_2-1706097851154.png

 

AmitVerma_3-1706097875071.png

 

AmitVerma_4-1706097896636.png

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.

Hi @Alex Saager1 

 

Did you got a chance to test this out ?

 

Thanks & Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.