Announcement

Collapse
No announcement yet.

Rebuild links between contacts and accounts in emails?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rebuild links between contacts and accounts in emails?

    Is there a way to rebuild the links between contacts and their accounts, for emails?

    We are experiencing the case where an email sent to a contact is being associated with a different company account.
    As in dave@company_a.com is a contact for Company A

    When I send an email to dave@company_a.com from Outlook/Gmail, when it arrives in Espo, the email is in the stream for dave@company_a.com but also in the stream for Company B. And it is not in the stream for Company A.

    Dave's connection is correct (he appears as a contact for Company A).

    I believe that there is some linkage somewhere that has gotten off, but I don't know where to look.

    Is there a way to rebuild those links?
    If not, where should I look for the problem links?

    Thanks in advance

  • #2
    Hi Doug,

    When the email is being imported in EspoCRM it users a few ways to link it with Parent entity.

    1. Taking 'References' header from the email. When you send email from EspoCRM it writes an information about parent entity into References header. All email clients keeps this header when email is replied. It means if email is replied EspoCRM links that replied email to initial parent record.

    2. When there is no information about parent in References header found then the script is taking email addresses one be one from 'From', 'Reply-To', 'To' and trying to find matching parent record.

    Could it be the case when you send email to dave@company_a.com the Reference header already contains information about company B. It would happen if you used Reply to another sent email to use it as template.

    Also it can be that your email address is the address of some contact from Company B. Since 'From' is taken before 'To' it will link with Company B.

    You can look into code: https://github.com/espocrm/espocrm/b...orter.php#L232
    Last edited by yuri; 05-03-2017, 07:41 PM.

    Comment

    Working...
    X