web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Creating new lead from email with populated fields

(0) ShareShare
ReportReport
Posted on by

Is there any way I can create a sort of email "template" and create some sort of workflow process or manual-add process that will create a new lead and populate certain fields (such as name, phone number, etc.) that if pulls from the email body?

I have complete control over what the email looks like that's being sent, I just want to be able to see the email, click on a button and have it create a new lead without having to copy/paste the values from the email into the lead form.

For example if an email comes in to sales and looks something like:

Customer Name: Joe Schmuckatelly
Phone Number: 555-123-4567
Product: My Product1

etc...

Then have some process where I can look at the email and click on "Create New Lead" and have it auto-populate the lead form with the name, the phone number and the product?

A manual process as described would be ideal that way in the event of an existing customer filling out that form, it doesn't create an unnecessary lead, but even if it has to be an automated workflow, that could work also.

Thanks!

Nick

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Royal King Profile Picture
    27,686 on at

    You can use custom ribbon button with javascript  to create new lead and open the same.

    In javascript you need to parse the email body to extract the details and create new lead , once lead is created you can open lead by using Xrm.Utility.openEntityForm(name,id,parameters)  ;

    Other option is creating custom workflow to parse the emailbody to create lead

  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi Nick,

    If you want to translate your own email template to new Lead, I think you need to create plugin or custom workflow or now CRM 2013 has Custom Action.

    Currently, CRM has feature to convert to Lead, but only email address and name that can be translated and copy over to lead, which I think you need more than just an email address and name.

    I have same requirement before to translate the body of email as lazy approval, but not to Lead, instead, as Approval record from the body, so I used plugin when an email was created then create a new Lead from your own template.

    There is no out of the box function to achieve your requirement :)

    Thanks.

  • Suggested answer
    Hosk Profile Picture
    on at

    Because the email is basically a multi line text field, you will need to go through the text and find those fields and values.

    You can either add a ribbon button or perhaps use a workflow/dialog to trigger some custom code.

    You can do this using either Javascript or a plugin.

    You will need to go through the email line by line looking for those key words and then save the value.

    this forums/blog posts will help get you started

    http://stackoverflow.com/questions/10171559/how-to-read-email-body-in-a-crm-2011-plugin

  • Suggested answer
    Hosk Profile Picture
    on at

    This video will show you how to do it

    www.youtube.com/watch

    Also this blog post is excellent

    ashwaniashwin.wordpress.com/.../convert-html-to-plain-text-for-copying-email-message-in-crm-2011-2013

  • Community Member Profile Picture
    on at

    Okay. I'm trying to make a plug-in for this and I think I'm just about there, except that I keep getting an Access Denied error when I use the _serviceProxy.Create(lead) method. Everything appears to be authenticating just fine because if I change either my username or password, then I get an ADFS token error. But using the correct username/password, I'm getting what appears to be a CRM specific error. (Not showing all the required code before for simplicity, but it generates the serverConfig object and creates the lead object.)

    OrganizationServiceProxy _serviceProxy;
    using (_serviceProxy = ServerConnection.GetOrganizationProxy(serverConfig))
    { _serviceProxy.EnableProxyTypes();
    bool isAuth = _serviceProxy.IsAuthenticated; //This returns True guid = _serviceProxy.Create(lead); }

    But once it hits the Create() method, I get the error:

    System.ServiceModel.Security.SecurityAccessDeniedException: Access is denied.
    
    Server stack trace: 
       at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
       at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
       at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
       at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
       at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)Exception rethrown at [0]: 
       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
       at Microsoft.Xrm.Sdk.IOrganizationService.Create(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.CreateCore(Entity entity)
       at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.Create(Entity entity)
    


    I'm a domain admin on the network, and I'm a sys admin on CRM with all available roles.

    Any ideas?

    Thanks,

    Nick

  • Community Member Profile Picture
    on at

    Hi Ben,

    I am currently working on something similar to what Nick4978 is trying to achieve here. As I am very new to CRM SDK, it would be absolutely fantastic if I could have your advice.

    I like the idea of having a ribbon button in my email queue page. I want the button to have the following functionalities:

    1. Parse the HTML email

    2. Extract keywords such as First Name, Last Name, Email, Company Name etc.

    3. Create a lead by using the above mentioned keywords

    If I am to develop this in Visual Studio using either JavaScript or Plugins (please suggest which is a better approach), how can it be done? I've watched some of your youtube videos as well as Steve Green's but I am struggling to find a way to get this development going.

    So far, I've created a VS project with Dynamics CRM. If I want to configure the ribbon button to have the above functionalities, how can I implement this? Would you be able to give me a step by step instruction?

    By the way, I am using CRM 2016 Sandbox to develop this.

    Any advice will be highly appreciated.

    Many thanks in advance,

    Yoshi

  • Suggested answer
    Community Member Profile Picture
    on at

    I ended up developing my own solution using Visual Studio with a VS extension / template from a company called Add-In Express. (https://www.add-in-express.com/add-in-net/index.php)

    It was pretty simple and works great for developing all kinds of Office plug-ins if you're willing to pay for the tool. (about $350)

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Nick,

    SImilarly what I said in a previous post, instead of coding it ourselves, we used an online tool for this - parserr.com. We initially wanted to parse incoming email, as you mentioned above, and extract the data from the email and then send it to Dynamics as a "New Lead".

    We later changed that to using a spreadsheet, extracting row data (lead per row) from Excel using Parserr. You just send them the spreadsheet and setup your parsing rules and they automatically extract. But they do email body parsing too.

    Full disclosure - through talking to the founder of the business, Im happy to vouch for them and help them along. Which is what Im doing here.

  • Zap Objects Profile Picture
    924 on at

    You can use Zap Email Parser App to extract the information from email and create lead automatically. In the configuration section of app, you need to create parsing rules... which tell the app...what info needs to be extracted and in which crm field it will go...

    Best part is that this is a native app...and so works from within CRM...
    https://zapobjects.com/apps/zap-email-parser/

    Regards,

    Sumeet

    www.zapobjects.com

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans