Check email attachment type as part of Pega Email Bot/Channel

Dear Experts,

We are building an application using Pega Email Bot/Channel. We have one use case where we need to check attached file type/extension. We are unable to check email file attachment from the Email Triage(ET-) case. Any suggestion will be helpful.

Use Case: Create Business Case if email contains MS Excel file. Don’t create business case if any other types of files are attached to email.

Thanks,

Santanu

@SantanuMan excellent question.

Email bot provides flexibility with intelligent routing. You can create When rule to evaluate this condition. Here is how you can achieve this -

  1. Create a when rule that iterates over all attachments and returns true if one of the attachment contains ‘.xls’ extension.
  • Value list that contains all attachments of ET case during email runtime - pyAttachmentPage.pyAttachNames
  • To iterate over value list, you can create a rule utility function
  1. Use that when rule in Intelligent routing

Please post here if you need clarification.

@Vikas@Multichannel

Thank you. This is helpful.

@Vikas@Multichannel

Vikas,

Another related question. We need to check file type and NLP topic together.

It seems pyPrimaryTopic property is not set when the routing When rule evaluation happens. We can check pxAnalysis page to loop through and identify topics. Do you have any suggestion on this requirement?

Example use case: create business case when topic is “Address Change Request” and email contains xls file attachment.

It will be great if there is a way to use NLP attributes along with when rule using AND/OR logic.

@SantanuMan you can use intelligent routing for that purpose. Take a look at the screenshot.

@Vikas@Multichannel

Thanks Vikas. I was able to get to this point but struggled with OR condition.

Taking your example - Create business case if HasJPGAttachment OR Topic is MyCase. I didn’t find option to keep these conditions in OR combination. I put the entire logic into a single when and used that in channel. Please let me know if there is a way to put multiple OR conditions in intelligent routing.

@SantanuMan Multiple OR conditions are not possible in Intelligent routing. The way you did with a when rule is correct approach.