Вы находитесь на странице: 1из 13

ENHANCE BUSINESS PROCESS FLOWS WITH BRANCHING

Business process flows guide you through various stages of sales, marketing, or service
processes toward completion. In simple cases, a linear business process flow is a good
option. However, in more complex scenarios, you can enhance a business process flow
with branching. If you have the create permissions on business process flows, you’ll be
able create business process flow with multiple branches by using the If-Else logic. The
branching condition can be formed of multiple logical expressions that use a
combination of AND or OR operators. The branch selection is done automatically, in real
time, based on rules defined during the process definition.

The following diagram shows a business process flow with branches.

What you need to know when designing business process flows with branches

Take notice of the following information when you design the business process flow
with the branches:

Page 1 of 13
 A process can span across a maximum of 5 unique entities.

 You can use a maximum of 30 stages per process and a maximum of 30 steps per
stage.

 Each branch can be no more than 5 levels deep.

 Branching rule must be based on the steps in the stage that immediately
precedes it.

 You can combine multiple conditions in a rule by using the AND operator or


the OR operator, but not both operators.

 When you define a process flow, you can optionally select an entity relationship.
This relationship must a 1:N (One-to-Many) entity relationship.

 More than one active process can run concurrently on the same data record.

 You can rearrange tiles (Stages, Steps, Conditions etc.) on the process flow using
drag and drop.

 When merging branches, all peer branches must merge to a single stage. The
peer branches must all either merge to a single stage, or each peer branch must
end the process. A peer branch can’t merge with other branches and at the same
time end the process.

 Note

 An entity used in the process can be revisited multiple times (multiple closed
entity loops).

 A process can go back to the previous stage regardless of an entity type. For
example, if the active stage is Deliver Quote on a quote record, process users can
move the active stage back to the Propose stage on an opportunity record.

In another example, suppose a process is currently in the Present Proposal stage


in your process flow: Qualify Lead > Identify Needs > Create
Proposal > Present Proposal > Close. If the proposal presented to the customer
requires more research to identify customer needs, users can simply select
the Identify Needs stage of your process and choose Set Active.

Page 2 of 13
Example: Car selling process flow with two branches

Let’s look at the example of the business process flow with two branches, for selling new
and pre-owned cars.

First, we’ll create a new process named Car Sales Process.

1. Open solution explorer and then in the left navigation pane select Processes.

2. Select New to create a new process.

3. Specify the Category as Business Process Flow and for the


primary Entity choose Lead.

4. Add the first stage to the process called Qualify and add steps Purchase Time
frame and Car Preference.

5. After the common Qualify stage, we split the process into to two separate


branches, by using the Condition tile.

1. Configure the condition tile with rules that meet your business
requirements

2. To add the first branch for a stage, add a Stage tile on the “Yes” path of
the condition tile

3. To add the second branch that is executed when condition is not satisfied,
add another Stage tile on the “No” path of the condition tile

 Tip

You can add another condition on the “no” path of an existing condition tile to create
more complex branching.

Page 3 of 13
If the Car preference = New, the process branches out to the New Car Sales stage,
otherwise, it jumps to the Pre-Owned Car Sales stage, in the second branch, as shown
below.

Page 4 of 13
After completing all the steps in the New Car Sales stage or Pre-Owned Car
Sales stage, the process returns back to the main flow, with the Deliver Quote stage.

Page 5 of 13
Prevent information disclosure

Consider a business process flow with branches for processing a loan request at a bank,
as shown below. The custom entities used in the stages are shown in parenthesis.

In this scenario, the bank loan officer needs access to the Request record, but the loan
officer shouldn’t have any visibility into the investigation of the request. At first glance, it
looks that we can easily do this by assigning the loan officer a security role that specifies
no access to the Investigation entity. But, let’s look at the example in more detail and
see if this is really true.

Let’s say that a customer puts in the loan request for over $60,000 to the bank. The loan
officer reviews the request in the first stage. If the branching rule that checks if the
amount owed to the bank will exceed $50,000 is satisfied, the next stage in the process
is to investigate if the request is fraudulent. If it’s determined that this is indeed a case
of fraud, the process moves on to taking a legal action against the requestor. The loan
officer shouldn’t have visibility into the two investigative stages as the officer doesn’t
have access to the Investigation entity.

However, if the loan officer opens the Request record, all would be able to see the entire
end-to-end process. Not only will the loan officer be able to see the fraud investigation
stage, but she’ll also be able to identify the outcome of the investigation by having been
able to see the Legal Action stage in the process. Also, the officer will be able to preview
the steps in the investigative stages by choosing the stage. While the loan officer won’t
be able to see the data or the step completion status, she’ll be able to identify the
potential actions that were taken against the submitter of the request during the
investigation and legal action stages.

In this process flow, the loan officer will be able to see the Fraud Investigation and Legal
Action stages, which constitutes an improper information disclosure. We recommend

Page 6 of 13
paying special attention to the information that may become disclosed due to
branching. In our example, split the process into two separate processes, one for the
request processing and another one for the fraud investigation, to prevent the
information disclosure. The process for the loan officer will look like this:

The process for the investigation will be self-contained and include the following stages:

You will need to provide a workflow to synchronize the Approve/Deny decision from the
Investigation record to the Request record.

Page 7 of 13
USE CUSTOM CONTROLS IN BUSINESS PROCESS FLOWS

Business process flows provide a guided way to get work done in the form of stages and
steps. Stages tell you where you are in the process, while steps are action items that lead
to a desired outcome. Steps in a business process are bound to fields in Common Data
Service. In addition to the default visualizations of the field type (text boxes, dropdowns,
and so on), you can use custom controls to add rich visualizations (such as sliders, radial
knobs, the LinkedIn control, and more) to business process flows steps and deliver
engaging experiences to those who use your business process.

Adding custom controls to a business process

Let’s say that you’d like to add a radial knob for the Estimated Budget step and a flip
switch for the Identify Decision Maker step of the Lead to Opportunity Sales process.

Here are the steps you must follow to add custom controls to a business process flow:

1. Configure custom controls on a related entity form.


2. Generate and exporting the business process flow form.
3. Copy custom control configurations to the business process flow form from the related entity
form.
4. Import the customizations back into Common Data Service.

Page 8 of 13
BUSINESS PROCESS FLOW ATTRIBUTES

Legacy process-related attributes in entities is deprecated. Here are some best practices
for using the Active Stage (activestageid) attribute on the business process flow entity.

Reporting on the active stage of a business process flow

Let’s say that you’d like to get a view of your sales pipeline by reporting on the active
stage that the Lead to Opportunity Sales Process is on.

Previously, to report on business processes by stage, one might define a view on each
related entity of the business process flow and then report on the Active
Stage (activestageid) field.

With the deprecation of the Active Stage (activestageid) field on related entities, there


are two ways to report on business process flows.

Option 1: Views and charts on business process flow


entity (Recommended)

In versions 9.0 and higher, each business process flow creates its own Common Data
Service entity, usually with the same name as the business process flow. To report on
the business process flow, select the entity for the business process flow you want to
report on, and then create views and charts, just as you did before.

In our example, follow these steps to go to the Lead to Opportunity Sales


Process entity:

1. Go to https://make.powerapps.com.

2. Select the Data.

3. Select the Entities.

4. Set the filter to All.

5. Search for, and then select the Lead to Opportunity Sales Process entity.

Page 9 of 13
Here, you can define views and charts just as you do on any other entity.

An advantage of this approach is that you can use a single view or chart to report on
business process flows that span multiple entities.

Further, as the business process flow entity is no different from any other custom entity
in Common Data Service, you can add custom fields to the entity to track any additional
information you need.

Option 2: copy active stage to a related entity

Alternatively, to continue reporting off the related entity, create a flow to copy
the Active Stage (activestageid) field from the business process flow entity into a custom
field on the related Common Data Service entities.

Here are a few things to keep in mind when you use this approach:

Page 10 of 13
1. It's possible to have more than one business process flow running on a single
entity. With this approach, it's best to have one custom field that stores the active
stage for each business process flow that runs on the entity. This approach ensures
the integrity of the reporting.

2. As reporting is driven from the related entity, it's not possible to create a single
view that reports on business process flows that span multiple entities.

Using the active stage to run logic

Here are some cases in which you might want to run logic that's based on the active
stage:

Using the active stage to run client-side logic

As you use the business process, there are many things that you might want to do
automatically. For instance:

 Change the active business process flow based on newly available information on
the form or business process flow.

 Move the active stage to the next or previous stage, based on values the users
entered for steps or form fields.

 Hide or show form tabs and fields based on the selected stage.

 Show informative messages and run calulations based on the active business
process flows, the active or selected stage, or events such as moving the active
stage.

 Tip

For scenarios like these, use the supported set of client APIs for business process flows.

Using the active stage to run server-side logic

There might be cases where automation based on the business process flow needs to
be done server side. For instance:

 Send an email to a user if the Qualify the stage of the Opportunity Sales


Process is active for longer than 15 days.

Page 11 of 13
 Automatically create a set of activities relevant to the active stage of
the Opportunity Sales Process each time it changes.

 Automatically finish the Opportunity Sales Process when the phone call activity


for closing completes.

 Tip

Use classic Common Data Service workflows or flows you define on the entity for the
business process flow.

To build a classic Common Data Service workflow that creates activities for internal
solution reviews and to follow up with the customer in the Propose stage of
the Opportunity Sales Process:

1. Create it on the Opportunity Sales Process entity and set it to run each time


the Active Stage field of the entity changes.

2. Define a condition to check if the Active Stage field equals Propose.

3. Create an appointment and phone call record for the internal review of the
solution and the customer call to review the solution respectively.

Page 12 of 13
Page 13 of 13

Вам также может понравиться