Personalized Community is here!
Quickly customize your community to find the content you seek.
Check out the latest Sales updates!Learn about the key capabilities and features of Dynamics 365 Sales and experience some of the new features.
Download overview guide | Watch Sales video
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
Hello,I am trying to build automation on opportunity using different set option field values that are defined in the entity 'contact' such that during different opportunity stages, it'd fetch the value from 'contact' accordingly and show it in the status reason field on the form in the following manner:-1. Discovery stage of opportunity --> 1. SQL
2. Closed won --> 2. Customer
3. Closed Lost --> 3. Lost
4. Lead --> Qualified / Meeting Booked.
How to do this or perhaps achieve this?
I need to restate your question to confirm I understand what you're asking.
SQL, Customer, Lost, Qualified / Meeting Booked are all on the Contact entity in an option set. You then want to fetch this value and show it in the status reason on the Opportunity as the Opportunity moves through the stages? This to me doesn't make sense, because the Contact option set wouldn't change....
Did you mean to say you want the Contact's option set to change as the Opportunity moves through the stages? because this makes more sense to me. Basically if the Opportunity is won, the Contact becomes a "Customer," if it's lost they become "Lost," and if it's in the first stage of Lead then we flag the Contact as "Qualified / Meeting Booked."
If this is what you're asking then its quite simple. Create a workflow on the business process flow that writes the "stage name" to a text field on the Opportunity it is attached to. Then a workflow on the Opportunity to update the Contact based on the stage name. There you'll house the logic that says if stage name = "Closed as Lost" then Contact is "Lost"
alternatively if your stages sound a lot more like a mix of statuses and stages, and even a different entity. If that's the case you need to consolidate the logic into a more concise system, like the stage names I suggested, or just use Status Reason for your "stages."
I hope you found this helpful, let me know if I missed the mark.
So the later part is what I exactly want since you have described it correctly. Regarding your steps on how to proceed ahead with this, would you please elaborate on it step by step and how to create a workflow and on which specific entity. I'd appreciate it much. Thank you.
Because Won and Lost are statuses, and Lead is a different entity, and SQL is the only step that is truly a stage... let's try to come up with something easier since you aren't really using "stages" as they are defined in a business process flow.
Firstly, setup your Option Set on the Contact entity. Let's called it Relationship Status (there's a default Relationship type but I'll leave that to you to decide whether or not to re-purpose it)
- Relationship Status
Now let's get the Status portion out of the way.
Workflow 1: Update on Status changeEntity: OpportunityTrigger: On Status Change, On CreateLogic:
note: If a Lead is qualified to an Opportunity and a Contact is created this will automatically set your Contact's Relationship Type to "Qualified Prospect". The check condition at the start is to ensure you're not changing a customer's relationship type just because they have a new opp, or lost one recently.
before we do workflow 2 I have to ask, how are we identifying that we're in discovery? can we make it a new field, call "in discovery" like a checkbox on the Opportunity? I don't want to go into stages and workflows on business process flows if we're just writing 1 single stage name. If that's ok, see below, also this would be the easiest way.
Workflow 2: In Discovery, Update ContactEntity: OpportunityTrigger: On fields change (check off the proposed "In Discovery" field)
If you have your heart set on redefining your business process flow into a stage like process with updates such as, New Lead -> In-Talks -> Nearing Deal -> Customer (if won), and Lost Prospect (if lost) then we can talk about creating a workflow off your Business Process Flow instead.
Let me know, and mark as the suggested answer if you like the approach I provided with the 2 workflows.
I have set my option set on the 'contact' entity and placed the field on the header section of the form as well as named it as 'Lead Status.'
Now regarding your workflow 1,
in your step:
1. Update Record (Contact)
2. SET Relationship Type = Customer
I am able to add the steps until 'update the contact' like this :
But not sure how to set the Relationship Type to Customer using the set properties button:
Also, I can't see the Lead Status field that I have defined either. Any possible issue here?
So you're updating the relationship type or your custom option set called "Lead Status?"
Either way if you don't see it at the top, check down below in the "Additional Fields" section of the Contact Set Properties area.
Hi, Greetings.I have managed to finish the first workflow but the second workflow is not really working.1. When the opportunity is open and then If I select the checkbox to set it as 'Yes', after saving the form, the lead status does not change to 'SQL', the status still stays as 'Qualified /Meeting Booked.'
Is the workflow 2 conflicting with workflow 1 because of the opportunity status as 'Open'? Any possible leads to this would solve the whole issue for me. Thanks in advance.
Well the trigger is on Create and Status change to set to Open, Won, or Lost so the update of a field shouldn't affect trigger workflow 1. You could turn on Audit History to check it out.
Did you check your "process sessions" in the workflow to confirm the logic is firing?
Checked the "process sessions" to confirm and no, the logic is not firing upon the selection of checkbox. I have made sure to follow the correct process for the creation of workflow process.
I just read someone else who had the same issue and tried 3 things.
1. Set as on demand and see that it updates correctly when manually run
2. Convert to a real-time workflow and see if it works
3. Convert back to a background workflow (something about going real-time to background helped one person out)
4. Just found someone who put in a conditional branch that is set to "Stop Workflow" if the field = No.
Converting it to real-time workflow and back to background work-flow did the trick.
But let's say if I uncheck the 'In Discovery Field', shouldn't the 'lead status' be changed back to 'Qualified/ Meeting Booked'?
No it wouldn't. You'd have to add logic to workflow 2
- IF Discovery Field = No AND Contact (Customer) Relationship Type = SQL OR Lost Prospect
- UPDATE Record Contact (Customer) Relationship Type = Qualified / Meeting Booked
so now Yes = SQL (as it already does)
and No = Qualified / Meeting booked
Thanks for all the help until now. Really cleared out my understanding of the workflow and logic.
Accepting your main posted answer as the actual answer.
Have a great day!
Business Applications communities