Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Attaching emails sent via third party to CRM records

Posted on by 3,079

We use MailChimp for our bulk mailing, and there are a number of apps for integration with that.  However, for our transactional mailings (thank you emails, etc...) we use Mandrill, as that's what we were in before, and we have a paid MailChimp account that people are used to anyway.

I was able to quite quickly write an integration to send the info to Mandrill to send out the email - basically an API call that sends the necessary data for the merge fields, as well as the template to use.  All good, and no issues.  Comms can continue using the template editor they like and are familiar with (and obviously, the one in CRM isn't as powerful, since it's not intended to be an email marketing system).

Only issue is this - I'm not entirely sure how I could attach that email to the contact record, so we see it with any other emails (meaning, the ones sent manually from Outlook) that have been sent to this contact.  I theoretically could do a call back to Mandrill, fetching the info, and then create an email activity in the system, but with server-side integration enabled I feel like this would just end up sending a second email rather than attaching the one being sent through Mandrill.  Is there any way to do this that doesn't affect the user (i.e. they don't get multiple emails), but allows me to track it in CRM like any other email, and not in a separate area just for Mandrill?  Maybe something like BCCing some address of ours, and adding in tracking tokens somehow?

*This post is locked for comments

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Attaching emails sent via third party to CRM records

    Just changed it to cc our address and it works fine.  Not ideal, but it should do for now until we figure out our longer term marketing/CRM plans.  Thanks!

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Attaching emails sent via third party to CRM records

    Hit a snag.  This works when something is emailed directly to this email address, but not if it's bcc'd (which is how we have Mandrill set up at the moment).  Will have to keep poking.  :-(

  • prt33k Profile Picture
    prt33k 6,907 on at
    RE: Attaching emails sent via third party to CRM records

    The normal functionality is - any incoming email will get assigned to a queue. Usually the user who is working upon it will update the Worked By and the record is moved out of the queue.

    however in you case email is not being 'used' in CRM rather it is more for monitoring/log purpose so the queue functionality doesnt apply.

    If you are going to have thousands of email then offcourse it wont be good idea to leave it the queue - it keep increasing one table.

    We can have a workflow in that case which remove the item from queue.

    community.dynamics.com/.../crm-2011-removing-email-from-queue

    Thanks,

    Prateek

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Attaching emails sent via third party to CRM records

    It is required to have a queue to have the incoming emails get tracked automatically, or is there any other way?

    If this is the only way, is there any potential performance or other issue with these just piling up forever in a queue?

  • prt33k Profile Picture
    prt33k 6,907 on at
    RE: Attaching emails sent via third party to CRM records

    The OOB behaviour of CRM is to put the incoming email to a new queue. If you dont want that to happen then you can have a custom worklfow to move it out of queue and just be assigned to one user - but I dont think that is required.

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Attaching emails sent via third party to CRM records

    :-)  I was just playing with that as we speak (type).  That is definitely looking like it'll solve one half (and not even require coding, since they've created a plugin!).

    Still not clear on whether I actually need queues for this, and if so, how to manage it since we're not actually assigning, but I feel like this is the right path, anyway...

  • Verified answer
    prt33k Profile Picture
    prt33k 6,907 on at
    RE: Attaching emails sent via third party to CRM records

    You can use the steps here to show all the email for the contact(to,from), though it require custom dev effort :

    community.dynamics.com/.../show-all-related-activities-in-a-subgrid

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Attaching emails sent via third party to CRM records

    Ah - I think I see part of the issue.  We wanted to use a subgrid for Activities, rather than the Social Pane, because we didn't want some of the extra tabs and such on the Social Pane.  But the subgrid only shows them if the person is in the Regarding field; the SP shows them if the person is in any field.  I guess we can try to use the SP but fiddle with it via javascript if we had to, but I'd prefer to make the subgrid act like the SP and show all emails they're attached to.

  • awalters Profile Picture
    awalters 3,079 on at
    RE: Attaching emails sent via third party to CRM records

    Hmmm....good to know; that could be useful.  But I do still feel in this case that there could be an easier way that doesn't involve having to query Mandrill to get back all the info I sent them plus the template and everything that's in their system, and recreating the email.

    All of these emails are already bcc'd to a shared mailbox of ours.  It seems like we should be able to just have anything (or specific things based on rules) that come into this shared box automatically get brought into the system in emails and attached to the right people?

    I've been trying to play with this, but since our use case is somewhat different than the normal queues/cases I'm getting myself kind of confused.

    I've set up the shared mailbox as a mailbox in CRM (using server-side sync), approved, enabled, and tested it.  I associated it with a queue, and set it to convert all incoming email to activities.  I then sent it a test email.  I can see this test email come into the queue.  But, 1. I don't want to assign it to anyone; no one needs to do anything with it.  So I'm not certain whether it's okay just to leave them all there, or whether I can/should automatically mark them as done somehow, or...

    Also, when I look at the email I sent as it shows up in the queue, I can see my name in the from, and when I click on it it goes to me.  So that part is fine.  But, in our actual use case, I want this to attach to the activities panel of the person in the To field.  Is there a way for these auto-generated emails to put the To person in the Regarding field?  Right now Regarding is just blank.  I tried setting it in an "update email" step in a Record creation and update rule, but it doesn't give me "To" as an option to set Regarding to.  Only Regarding, Sender, Senders Account, Service, or Service Detail (custom entity).  I have no idea why it's limited to only these - on a new email, I can set a contact into the Regarding field, no problem.

    I think if we can solve those two questions, this would work perfectly for what we need.  It even brings in the attachments, which solves a different, future problem for us.  :-)

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Attaching emails sent via third party to CRM records

    Hi,

     if you create an email record in CRM through the SDK, it will not be sent out automatically  - there is a separate SDK request you need to submit in order to actually send an email:

    msdn.microsoft.com/.../microsoft.crm.sdk.messages.sendemailrequest.aspx

     You can see it with the workflow, for example. Tere is "send email" step and there is "create record" step (you can use the latter to create an email record, but it won't be sent anywhere)

     In other words, you can simply re-create those emails in Dynamics.

    PS. That's unless your other systems which are integrated with Dynamics will ignore that difference..

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans