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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Custom Workflow to Create Marketing Contact from New Lead

(0) ShareShare
ReportReport
Posted on by 69

I can't believe that this doesn't already exist in the platform, but when a sales user creates a lead manually or via import I want to be able to include this lead in marketing campaigns.

Since D365 Marketing uses contacts, I need a corresponding contact record to do this.

In the Marketing Guide on p664 it suggests a custom workflow to create a marketing only contact and link it to the lead via the parentcontactid column. I do this but it doesn't populate the "Existing Contact?" lookup field in the Qualify stage of the BPF. This field appears to be inaccessible...

Screenshot-2021_2D00_10_2D00_08-090324.png

Does anyone have an example of having done this successfully that they can share?

What are others doing for orphaned leads like this??

I have the same question (0)
  • Verified answer
    Nya Profile Picture
    29,060 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    Hi,

    Please refer to the following steps to create the workflow.

    Image

    Insert a step to create the related contact for the record.

    Image

    Set the value of the field in contact record with the existing value which you need in the lead record.

    Image

    Image

    Then update the lead record itself.

    Image

    Set the contact just created as the parent contact of the lead.

    Image

    After activating the workflow, you can select multiple / all leads and trigger the workflow for them manually.

    Image

    It eliminates the challenge of having to create contacts for a large number of leads.

    Image

  • dynamikes365 Profile Picture
    69 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    I believe I got it  to work now.

    In your example you had selected the 'Company Name' value for the contact just created instead of the 'Contact' so it wasn't populating at first. Now it does.

    I also would like to make this an automated process instead of just on-demand. I added a condition that if the marketing only field is yes on the contact to not run the process. This way any contacts created by Marketing processes like web form submissions can run and not be duplicated.

    I'll see how this works in testing.

    Thanks for your help!

  • Andrea G. Profile Picture
    15 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    Thank you for the step by step guide, I can't believe how microsoft doesn't have this process automated already.

    Anyway, i follow step by step your guide, also i tried how mike (comment below) said but is not connecting the contact to the lead. It is creating the lead but the second step doesn't work, any idea of why it can be happening?

  • dynamikes365 Profile Picture
    69 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    I don't know if there's any additional detail here, but this is a blog I wrote on the topic after I had it working.

  • Andrea G. Profile Picture
    15 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    Thank you for your help, I finally did it right, my problem was that i was not selecting the right record on parent contact id, i had to select create contact as process.

    Thank you!!

  • sljones76 Profile Picture
    45 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    Hi!  Love this.  Created it.  The only issue is now I have two contacts created.  so there is a duplicate contact record.  I thought it would take that "marketing only" contact and make it marketing only "no" when we qualified a lead.  Any idea on what step I need to add for this?  I definitely don't want duplicates.

    Thank you.

  • dynamikes365 Profile Picture
    69 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    It sounds as though your first workflow did not set the parentcontactid field to link the two records together.

    parentcontactid.jpg

    If the marketing only contact is attached to the lead via this field, then when the lead is qualified it won't create a duplicate because it's already "married".

    The second workflow will set the marketing only flag on the contact to "no" when the lead status changes to qualified.

  • sljones76 Profile Picture
    45 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    Ok, now I'm just confusing myself more...lol.  Here is what I have now on the Parent contact for contact and for lead.  Is this look right or am I still wrong?  Thank you.

    pastedimage1664479192309v1.png

    pastedimage1664479240062v2.png

  • dynamikes365 Profile Picture
    69 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    Yea, it's easy to do.
    In the first workflow, when you create the contact record you do not populate the parentcontactid field. This value is generated after the record is created and is used to write back to the lead in the second step.
    The value that you use to populate the lead update step is a value pulled from the Process you're running which displays at the bottom of the list of available tables under Local Values.

    Local-Process-Values.png

    I can't tell if you're using the right values because your workflows are named something different than mine. You're only using the process local value on the lead update step though.

    Hope that clarifies.

  • sljones76 Profile Picture
    45 on at
    RE: Custom Workflow to Create Marketing Contact from New Lead

    Woo-hoo, it worked!  Thank you so much.  My only issue now is it's not changing the Marketing Only to "no" after a lead is qualified.  I guess I need to build a workflow to make that happen separately...

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 125

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 101 Super User 2025 Season 2

#3
Erin Lubben Profile Picture

Erin Lubben 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans