Question
Last activity: 7 Jun 2017 1:08 EDT
Emails not being attached to cases appropriately
Hi All,
I have a scenario were i need to attach the email to existing case on reply of the email sent from pega.
I know this is handled by pyMessageID and this property is getting updated with a value but i am not able to fetch appropriate case id on basis of this messageid.
I am getting an error saying Email not found.
What could be the possible issue?
Thanks.


Pegasystems Inc.
IN
Hi Santanu,
There's no error or any failure in tracer.
In the logs i see "Email not found" error . i am using the standard pega activity ProcessInboundEmail. MessageId is populated but it is not able to fetch pyLabel on Obj-Browse.
Thanks,
Hi
Could you please tell me if you have customized ProcessInboundEmail activity ? I could sense this by "but i am not able to fetch appropriate case id on basis of this messageid.". If yes then please share the complete Pega Rules log to see the exception trace of "Email not found" error .
Hi All,
We have a similar requirement to implement. The use case is as below
1. Pega sends out an email to any inbox
2.The recipient replies to that email and attaches documents to the email
3. Pega must receive the email , extract the case id (of the case used to send the outbound email - Send Correspondence) and attach the incoming email attachments to the case.
To implement this we wish to leverage the OTB features
1. @baseclass.SendEmailNotification for sending the email
2. "ProcessInboundEmail" for processing Inbound Mails
Following observations -
1. SendEmailNotification generates a random pyMessageID and places it to the header as "Message-ID" of the outbound email. {Something like " ----JavaMail.audl--"}
2. When the outbound correspondence [object of Data-Corr-Email] gets saved the Declare Trigger "Email" is invoked that stores the email in "Index-Data-Mail" with mapping " pyMessageID (of object Data-Corr-Email) to pyLabel (of the Index-Data-Mail)."
3.The ProcessInboundMail activity retrieves the Case ID (one from which the correspondence is sent) from the "Index-Data-Email" class by matching the pyMessageID of the incoming mail (reply to the pega correspondence mail) with pyLabel which contains the subject of the email with case id.
Step 3 will always fail for all incoming emails as the pyMessageID has a random value where as the pyLabel of the index class contains the Email Subject with error the emails are not getting found.
Could someone please throw some light to -
1. Why is a mapping done from pyMessageID to pyLabel when the correspondence always contains a random value for MessageID?
Looking for a solution with minimum customization by leveraging OTB Pega features.
Thanks
Juhi Joy
This comment has been branched out as a new node and the new thread can be followed here


Pegasystems Inc.
IN
Hi Juhi,
Even though your question is related to the original post above, we believe that having your question posted as a new discussion would make it more relevant to our community members. We have created a new post for you: Why is a mapping done from pyMessageID to pyLabel when the correspondence always contains a random value for MessageID?
Please continue trobleshooting over the new post!
Thank you,
@JillHaria
Please check the service and map "In-Reply-To" header to InboundMail.pyMessageID and check if the cases are getting picked with the Message ID.
Note - This will work only if the Subject of the message that comes in is not changed.
Hope this helps!
Hi
Can you please share the exact error string that you are seeing ?
Please try to trace and see where it is failing and check log files to see whether any relevant error is coming or not.