Groovy Script to update SR status when a Primary Contact adds a message
Summary:
In the Implementing HR Help Desk guides I found a Groovy Script to update the SR status when the Primary Contact adds a message on to the SR, I've created this but it isn't working, has anyone managed to get this working?
How can I automatically update a help desk request status after a customer response?
Groovy Script is:
def parentSR = ServiceRequest
def msgSource = SourceCd
def msgChannel = ChannelTypeCd
def parentStatus = ServiceRequest?.StatusCd
def msgType = MessageTypeCd
if (msgSource =='ORA_SVC_INBOUND_MSG' && msgChannel =='ORA_SVC_EMAIL' &&
msgType == 'ORA_SVC_CUSTOMER_ENTRY' && ParentMessageId !=null)
parentSR.setAttribute('StatusCd', 'CUST_RESPOND')
Content (please ensure you mask any confidential information):
0