Lower case issue in inbound action

Hafsa1
Mega Sage

I have a "reply" inbound action for custom payroll table which treats "re:" emails as new if ticket number is provided in subject. We are not using watermark for this actions.

Whenever user send email with payroll ticket number in subject in lower case new ticket is not getting created but when sent in uppercase it creates.

like:  if user send email with subject as in case 1 tickets are created but when he send as case 2, tickets are not getting created. No error in log file it just say "skipping as condition not met"

condition is : email.subject.toLowerCase().indexOf("pylt")>-1

 I tried condition as below but nothing works:-

email.subject.toLowerCase().indexOf("pylt")>-1

email.subject.toUpperCase().indexOf("PYLT")>-1

email.subject.toLowerCase().indexOf("pylt")>-1 || email.subject.toUpperCase().indexOf("PYLT")>-1

case 1:  "Issue in payroll wrt ticket number PYLT1000890. please resolve the issue"

case 2: "Issue in payroll wrt ticket number pylt1000890. please resolve the issue"

 

 

Where can be the issue

 

9 REPLIES 9

Hafsa1
Mega Sage

I applied logs in script to check. When I use uppercase ticket number in subject then I'm getting logs entry.

But when I'm using in lowercase no logs are getting created means this is not entering script and stopped at initial condition itself.

When I removed all conditions then also it's not getting logs entry.

can you please share the screenshot of script and condtion.

 

Hafsa1
Mega Sage

There is no issue with the code. But issue is the way inbound works. Will raise HI ticket.

 

AbhishekGardade
Giga Sage

Hello Hafsa,

Try using below code and check the result by adding log:

email.subject.toLowerCase().includes('PYLT')

email.subject.toLowerCase().includes('pylt')

 

Please mark as Correct Answer/Helpful, if applicable.
Thanks!
Abhishek Gardade

 

Thank you,
Abhishek Gardade

Madhuri23
Giga Contributor

Hello Hafsa,

As I am facing the same issue and seeking solution request you to please share if you were able to find any solution to it.

Thanks in advance!

 

Regards

Madhuri