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 Case Ticket Via Email for Customer Service Module

John Vo1
Tera Guru

Can someone help me with this.  I created an inbound for users in the customer service module to email in and it will create a case ticket.  But it's not working.

find_real_file.png

Email was received but it never created case ticket.  I see the target is blank and it should show case.

find_real_file.png

6 REPLIES 6

Nick Simonelli1
Mega Expert

I don't know that it's the cause of your problem, but just as an FYI gs.createUser() has been deprecated for a long time, and the docs recommend not to use it: Inbound Email Action scripts no longer support the gs.createUser() method. Use either the automatically-generated email variables or the gs.GetUserID() method instead.
Source: https://docs.servicenow.com/bundle/madrid-servicenow-platform/page/administer/notification/reference/r_MatchingEmailToExistingUsers.html

 

Additionally, I would take a look at the docs on CSM email properties.

Customer Service Email Properties: https://docs.servicenow.com/bundle/helsinki-customer-service-management/page/product/customer-service-management/reference/r_CustomerServiceEmailProperties.html

Customer Service Email Channel: https://docs.servicenow.com/bundle/london-customer-service-management/page/product/customer-service-management/concept/c_CustomerServiceEmailCommunication.html

 

The SN Nerd
Giga Sage
Giga Sage

CSM has a number of Inbound Actions OOTB to create Cases from Emails. There is no need to create your own.

In a nutshell, the user's email must match one of a Consumer or Contact record, and the prefix must match what is configured in the System Property. The default prefix is Case.

So, leverage OOTB and:

  1. Create a Contact record linked to the User account John Vo
  2. Send an email to the instance with Case in the subject

ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Paul,

 

so I use this OOB one and it created the case ticket.  But contact type, assignment group and category didn't come through.  Can you look at my script and see what I need to update to have these come through?

 

find_real_file.png

 

 

 

 

 

 

find_real_file.png

  • Typo on asignment group (should be assignment_group)
  • Assignment group is a reference field. Needs to be set to the sys_id of "Payables" group
  • For choice lists, you must set the field to the choice value, not display

ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022