Automatically Associating Emails With opportunity

Hi All,

I have use case as below:

Suppose if any opportunity is created/ updated then we send email to user via process definitions send message functionality, If the customer/user  replies/answers to that email then it should link to that opportunity  Emails subpanel.

Can anyone suggest how to achieve this?

Note that:

  1. Email which we are may or may not have assigned user in CC,TO,BCC
  2. Email might be sent to group email which may not be there in any users primary email address

Please suggest asap.

Kindest Regards,

Shreya

Parents
  • Do you tag your opportunities in any way?

    If you give your Opportunity a unique Opportunity number, and then tag the subject line of the message you send with that number (similar to what the system does with Cases) then you should be able to do leverage logic_hooks on the Emails module to for an after save processing where you would check the subject line for the Opportunity tag (make it unique so as not to confuse it with the Case number for Cases of course) and if that tag exists, and the email record is not already linked to an Opportunity, you can link the two in code.

    There may also be a way to do this in BPM but I've not played with that yet, so perhaps others will have better answers for you there

    Whatever way you do it, you have to find a way to "tag" that email with a unique identifier for the Opportunity and you need to do some post-processing after the InboundEmails process is done reading the email into the emails tables and add that relationship.

    Hope this gives you some ideas,

    FrancescaS

  • Dear Francesca,

    I have followed below steps:

    1. Enabled email achieving from Admin -> Email Archive
    2. Created email template with subject as "[OPP:<record-id>] ......."
    3. Added Email to be Archive in Email CC of send message event of process definition
    4. Created Process definition and included above email template in send message event of process definition
    5. Created after save logic hook on Emails module and checking email subject using regex "/\[OPP:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\]/" and if matched the parsing subject to get opportunity id and then linked to that opportunity
    6. When user replies to above Email, then now Email is Archived into Emails module and also linked to the respective opportunity.

    Current Issue:

    But  if email has signature in Email Archive then its creating Notes for each image in the Email, can you please guide me on how to stop creating Notes for the Email?

    Kindest Regards,

    Shreya

Reply
  • Dear Francesca,

    I have followed below steps:

    1. Enabled email achieving from Admin -> Email Archive
    2. Created email template with subject as "[OPP:<record-id>] ......."
    3. Added Email to be Archive in Email CC of send message event of process definition
    4. Created Process definition and included above email template in send message event of process definition
    5. Created after save logic hook on Emails module and checking email subject using regex "/\[OPP:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\]/" and if matched the parsing subject to get opportunity id and then linked to that opportunity
    6. When user replies to above Email, then now Email is Archived into Emails module and also linked to the respective opportunity.

    Current Issue:

    But  if email has signature in Email Archive then its creating Notes for each image in the Email, can you please guide me on how to stop creating Notes for the Email?

    Kindest Regards,

    Shreya

Children