Hi,
I’m working on an automation where a Lead is created from an incoming email using the Activity object. I referred to this thread for guidance:
https://community.creatio.com/questions/how-get-email-email-message-object
The setup is partially working, but I’m facing a couple of issues:
- Cases are also getting created automatically along with Leads, which is not required in my scenario, Is it because of the List of Mailboxes for Case Registration.
- When there is a reply to an email (e.g., subject starting with Re:), the system is creating duplicate Leads with names like Re: Lead Name.
Requirement:
- Only one Lead should be created per incoming email
- No Case should be created
- Email replies should not create duplicate Leads
Questions:
- How can I disable automatic Case creation from incoming emails?
- What is the best way to prevent Lead creation for reply emails (Re:, Fwd:)?
- Is there a recommended approach (filters, business process conditions, or object-level logic) to handle this cleanly?
Any guidance or best practices would be really helpful.
Thanks in advance!
Like
Hello,
1. Case creation
Most likely, the Case is being created because the mailbox is configured in the list of mailboxes used for case registration.
To prevent Cases from being created from this mailbox, you may use one of the following options:
- Remove this mailbox from the corresponding lookup used for case registration.
- Remove the service license from the mailbox owner. In this case, Cases will no longer be created for this mailbox.
2. Preventing duplicate Lead creation
Creatio email threading data includes fields such as MessageId, InReplyTo, and ParentMessageId in EmailMessageData. The MessageId and InReplyTo fields are populated from the email headers during synchronization.
To avoid creating duplicate Leads, we kindly recommend configuring your process so that a Lead is created only when all of the following conditions are met:
Activity type = Email
Mailbox = your mailbox
Subject does not start with Re:, RE:, Fwd:, FW:, or Fw:
InReplyTo is empty
ParentMessageId is empty
This approach should help ensure that Leads are created only from new incoming emails and not from replies or forwarded messages that are part of an existing email thread.