Dynamics 365 Multi Entity Business Process Flows

David Mochrie, 20 March 2017

Business Process Flows have been around for a while in Dynamics CRM (now Dynamics 365 of course), since 2013 in fact. They are very useful in helping organisations model their processes in CRM and help guide users through stages of the process.

However, there are some limitations which are important to understand before embarking on configuring any BPFs. I’ll cover one of them here, namely moving between entities.

Many business processes need to cover more than one entity (i.e. record type) in CRM. The process may start with an account and then move to a case, or start with a contact and move to an opportunity etc.

There are some out of the box BPFs which cross over from one entity to another, e.g. the ‘Lead to Opportunity Sales Process’, shown below:

image

The first stage of this process, the ‘Qualify’ stage, is on the lead, but the later stages are on the opportunity. You can’t access the later stages until you define which opportunity you are using, hence the locks on those stages.

When you create a custom BPF, you can join any 2 entities, as long as both are enabled for BPFs. When you do, you can define the relationship that the BPF has to use for that entity join. So, for example I could have a BPF which started on a Case record and then moved to an Opportunity record. The screenshot below shows the BPF configuration screen, with Stage 2 selected:

image

The ‘Relationship’ field, which is defining the relationship the Opportunity in this stage has with the Case in Stage 1, shows ‘None’ and if you select the dropdown, no other option is available. This is because there is no relationship between Cases and Opportunities. There are none out of the box and I haven’t created any custom one. (By the way, the same limitation exists on the old BPF designer).

For BPFs, what this means is that when I move from the Case to the Opportunity, I wouldn’t be able to move the process to an existing Opportunity.

image
As you can see here, when I select the ‘Next Stage’ (Stage 1 is on the Case, and Stage 2 is on the Opportunity), it tells me that no Opportunity records exist, but does give me the chance to create one.

So, in what situations can you go from one entity to an existing record on another entity using a BPF? To do that a 1-to-many relationship has to exist, i.e. the entity in the stage before the entity change has to be the parent entity and the entity in the stage after the entity change has to be the child entity. So, if you have created a BPF which goes from, say, Account to Contact, when you are designing this BPF in CRM, you get the chance to select the existing 1-to-many relationship called ‘Company Name’ which exists out of the box:

image
Now, when I go into an account, and move it to the contact stage of the BPF, CRM asks me which existing contact I want to use, and shows me the contact s related to that account through the Company Name relationship.

image

I can still create a new contact if I want to, and move the BPF on to that new contact.

So, in summary, in order to go from one record to another existing record in a BPF, you can only go through a 1-to-many relationship. You can’t go through a many-to-many and you can’t go through a many-to-1.

There is one exception to this. When you start in one entity and go to a child entity in a subsequent stage and then back to the primary entity in a later stage, you can go back to the record from the first stage, but only that record, e.g. Stage 1 is for Account, Stage 2 is for Contact, using the Company Name relationship, and Stage 3 is for Account again. When you set up the BPF, on Stage 3, if you select Account, you can't select any relationship. When you use the BPF, if you started at ABC Ltd in Stage 1 then went to Joe Bloggs who works for ABC Ltd in Stage 2, when you click on Next Stage from Stage 2, you are taken straight to ABC Ltd.

This is both good and bad. Good that you can go from child to parent in later stages, but bad that you can only go to the record from the earlier stage. So, in the example, if you wanted to go to an account which is different than the Account in the earlier stage, you wouldn't be able to do it.

A further limitation worth mentioning is that you can’t go from parent to child on a self-referential relationship, e.g. you can’t go from a parent account to a child account in a BPF.

There are other limitations on BPFs, which I hope to blog on in future. BPF’s are still a great CRM feature though and can really help your users, so don’t be shy in giving them a try!

Happy CRMing everyone!