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 :
Customer experience | Sales, Customer Insights,...
Suggested answer

Disqualify a lead when a contact is created or updated

(1) ShareShare
ReportReport
Posted on by 11
Hi,
 
I'm struggeling to find a way to disqualify a lead when a contact is created or updated (when there are no relationship between lead and contact).
The scenario is when a specific column on a contact is set to value "x" I want to control if there are one or several open leads with the same email. If there are existing leads with the same email I want to disqualify them with reason "y".
Is this possible with Power Automate?
 
Thanks in advance!
//Sara
  • Soundari Profile Picture
    Microsoft Employee on at
    Disqualify a lead when a contact is created or updated
    Trigger: Use the “When a row is added or modified” trigger for the Contact table in Dataverse.
    Condition Check:
    Add a condition to check if the specific column on the contact equals "x".
    If true, proceed to the next step.
    Retrieve Leads:
    Use the “List rows” action on the Lead table.
    Apply a filter query to retrieve open leads where the email matches the contact’s email.
    Example OData filter: emailaddress1 eq 'contactemail' and statuscode eq 'Open'
    Loop Through Leads:
    Use “Apply to each” to loop through the retrieved leads.
    Inside the loop, use “Update a row” to change the lead’s status to “Disqualified” and set the disqualification reason to "y".
    Optional Relationship Check:
    If you want to ensure there's no existing relationship between the contact and lead, you may need to add a custom check using a Dataverse relationship or a custom lookup field.
  • Daivat Profile Picture
    400 on at
    Disqualify a lead when a contact is created or updated
    Hello Sara,
     
    Thanks for confirming that you were able to achieve the expected output. 
     
    Request you to please mark the answer as verified to help other community members find more.

    If you have further questions, please feel free to contact me.
     
    Best Regards,
    Daivat Vartak
  • SA-18061446-0 Profile Picture
    11 on at
    Disqualify a lead when a contact is created or updated
    Hi Daivat and Cui!
     
    Thanks for your respons! I got a bit stuck on the list lead-step, but after som trial and error I have a flow which work as I wished. Appreciate you taking the time to help out :).
     
     
  • Suggested answer
    Cui Hao Profile Picture
    on at
    Disqualify a lead when a contact is created or updated
    Hi,

    I implemented your requirements with Flow, roughly along the same lines as Daivat.
    In confirming no relationship between lead and contact, I utilized the /parentcontactid/ field for filtering.

    You can refer to my Flow design:

    1.When performing the List rows traversal, I filtered with the odata expression, and this selected to Leads that have no relation to the contact and the /Open Leads/ status of the leads.


    2. Filter all the leads filtered above again and perform an update operation on the leads that are the same as the contact's email.
    The update to the operation was to disqualify Lead on Y grounds.



    I suggest you filter with odata first before performing the update operation, because I had problems when I put it all in the last step to perform the update operation, maybe the amount of data is too large.
    Since /parentcontactid/ may be null, this field can also only be filtered by the odata expression.


    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more. If you have further questions, please feel free to contact me.


    Best regards,
    Cui Hao
  • Suggested answer
    Daivat Profile Picture
    400 on at
    Disqualify a lead when a contact is created or updated
    Hello Sara,
     
    Yes, this is possible using Power Automate. Here is the high-level logic. 
     
    1. Write an "Automated Cloud Flow" with the trigger on change of Contact specific column set to "X"
    2. Get the email address of the specific contact
    3. List Leads (Status Open, Email address as contact email address, you can add your custom filters to reduce records)
    4. Check if list rows have any output (if yes)
    5. Apply for each row (lead)
    6. Update the lead with status /status reason along with additional details as per your requirement. 
     
    If my answer was helpful, please click Like, and if it solved your problem, please mark it as verified to help other community members find more.
    If you have further questions, please feel free to contact me.
     
    Best Regards,
    Daivat Vartak
     

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

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Mohit Sharma Profile Picture

Mohit Sharma 24 Community Manager

#2
Jahanvi Profile Picture

Jahanvi 21

#3
Jatin kumar "Mandlay" Profile Picture

Jatin kumar "Mandlay" 14

Featured topics

Product updates

Dynamics 365 release plans