Inbound action

Mohammed Burhan
Tera Contributor

I want to have an RITM created when an external user sends an email to our dedicated mailbox.
i ma able to see the mail in the email logs with type as ignored.
I have tried creating a user profile to default to when an email from external vendor is sent so that its sys id is picked up form the system property.
it do snot seem to work as it does not create the RITM for the mentioned catalog item in the script and i am using cart api for this. This code works when an internal user sends an email as there is a record for this user in user table.
i have tried to activate the Guest user as the email logs in the inbox view mentioned about the guest user being inactive as it happens to be by design by servicenow to have Guest user as fallback in case of not finding the record in user table.
please suggest a workaround for this use case.

2 REPLIES 2

yashkamde
Giga Sage

Hello @Mohammed Burhan ,

 

Instead of relying on the default user resolution, you can write a custom inbound email action that :

 

for ex :

var userSysId = gs.getProperty('external.mail.user.sys_id'); // store in sys_properties
var cart = new sn_sc.Cart(userSysId);
var item = cart.addItem('catalog_item_sys_id'); 
cart.placeOrder();

 

Also Note The Cart API requires a valid sys_user context. Since external senders don’t exist in the user table, you must provide a generic external user or mapped vendor user in your script. Relying on Guest user won’t work because it’s intentionally inactive.

 

If my response helped mark as helpful and accept the solution.

prajaktakha
Tera Expert

Hello @Mohammed Burhan ,

 

You can achieve this with flow design:

Step 1 : Create the flow and select the flow Run As user who initiates the session

In recipient you can mention your dedicated mailbox

prajaktakha_0-1786377659781.png

Step 2: In action select the Submit Catlog Item as action

prajaktakha_1-1786378627074.png

Step 3 : Apply the condition as below

prajaktakha_2-1786378674173.png

Step 4 : Create the record in RITM Table

prajaktakha_3-1786378720612.png

 

If you found my solution as helpful please accept and mark as helpful.

 

Thank you,

Prajakta