How can I work out the time spent in each stage of a business process?

Business Problem: I want to know how long is spent in my business process by stage and by user how can I achieve this with no code?

The solution is actually quite simple if you are the latest release of Dynamics 365. The key to the solution is the fact that Dynamics now maintains the active stage and active start time for instance of a business process flow.

When you create a business process flow, a new entity is created to maintain the instances of the business process flow. So each time you start an opportunity, a business process record is created for the business process that is running that maintains the start time, active stage and status of that process. Thus when you switch process the previous process flow state is maintained.

So with this knowledge you now have a record that records the relationship to the business process and to the record it was initiated from.

Back to the problem. What I need is an entity to store the start and end time for each stage and a workflow that creates the record each time the stage changes. Simple as follows:

  1. Create a new entity, in my case I used an activity entity called Stage Duration. I used an activity entity, as it already has all of the fields that I need to record the stage duration i.e. Regarding, actual start, actual end, and subject. The one field that I did create is Stage duration, which is a decimal and is a calculated field. The calculation works out the difference between Actual End and Actual Start.
  2. Stage Duration
  3. Once I have published the entity I now need to create a workflow to fire each time the active stage changes for the business process that I want to monitor.
  4. Create a new process – workflow, select the newly created entity that corresponds to the business process that you want to monitor.
  5. Set the workflow to run on creation and when the active stage field changes.
  6. Now add action to create the stage duration activity, populate the subject with something like Stage: <<Active Stage>>, populate the actual start with the “Active Stage start time”, update the owner to the owner of the related record and set the regarding to the related record.
  7. Stage duration workflow 2
  8. Now add a wait step to wait until the active stage start time is not equal to the new activity creates actual start time.
  9. Then add the step to update the actual end time to that of the Active stage started on. (this is now the next stage started on time thus the end of the previous stage)
  10. That is it you now have a workflow that triggers at the start of the process and again each time the active stage is changed. That will record the start, end and duration of stage per process stage and user.
  11. Here is the workflow example below:
  12. Stage duration workflow 1
  13. Now each time I change the process a new activity is created as below:
  14. Opportunity stage
  15. Stage duration record
  16. This allows me to create charts as follows, i.e. by stage average time, and by user by stage average time.
  17. Stage reporting

 

The possibilities are now endless to the types of things I can do i.e. alert if a stage has not changed after a given time period, alert if average time is over norm, create a nice dashboard to show exceptions or enable me to identify focus stages to work on.

My New App Site Map is not saving my changes

If you do not use one of the supported 45 languages found here as your default user format (set in options) then you may encounter this problem.

Problem: When I click on the site map editor from the App Designer, I can not save my changes to the site map.

The simple fix is to change your format of your user to one of the supported 45 languages, then make your site map edits, save and publish, and then revert your format back to your preferred format. You can then open the new App and see your changes.

This simple video walks you through the issue and the fix that will enable you to create amazing new Apps.

Perform Action – Changing the business process via a workflow

So just taking a look at all of the available perform actions in workflows that are provided out of the box and found SetProcess.

SetProcess enables via a workflow to change the current business process of a record. For example, you are working on an opportunity and the decision timeframe is a year, this would most likely have a different sales approach to an opportunity closing in a month. Via a workflow we change the business process automatically.

So how do we do it? It’s easy follow these steps:

  1. Navigate to Settings->Processes
  2. Create a new process of type workflow, give it a name “Change process -long running opportunity” etc
  3. So for my example I create a condition on the Purchase Timeframe, if equal to This year then do action.
  4. I select perform action
  5. pefrom actiom
  6. I select SetProcess and click on properties. All I need to select is the business process and the record to apply it to.
  7. setprocess
  8. Save and close
  9. Finally Activate the process, all done.

When I navigate to my opportunity and update the purchase timeframe to This Year, once I refresh the record the business process will change.

setprocessoppty

 

Creating Apps in Dynamics 365

I want to create a new App that only shows my Stakeholder Managers what they need to see, how do I do this with no code? It is easy with the App Designer.

For an overview of how you do this there are some great articles that can be found on the Dynamics Help and Training guide.

The following table shows the steps you’ll take to create an app, taken from the training guide found here https://www.microsoft.com/en-us/dynamics/crm-customer-center/design-custom-business-apps-by-using-the-app-designer.aspx.

Step Description Related topics
Define app properties. Create or edit an app
Define navigation for an app using the site map designer. Create a site map for an app
Apps are composed of components like dashboards, entities, business process flows, forms, views, and charts. Include the required ones in your app by using the app designer. Add or edit app components
Check your app for any required components you haven’t added. Validate an app
Make the app available for use. Publish an app
Give users access to the apps you created by using security roles. Manage access to apps with security roles

Enabling resource scheduling for any entity

With Dynamics 365 Field Service, comes an amazing feature, the ability to schedule any entity, not just project tasks or work orders.

Why is this so good? Think of these scenarios:

  • I manage leads and I want to schedule those leads for calls base don the right skill match for the lead request
  • I need to schedule a team to deliver a presentation or process
  • I want real time updates on the progress of scheduled items
  • As a business we have cars that the staff can book, so need the ability to schedule the cars and see real time what is in use and when they will be back in

The list just keeps on going, the number of scenarios I can think about where there is a scheduling need is endless.

So how do I set this up, follow these simple steps to get you up and running:

  1. You will need either the Field Service or Project service App or a Plan license to utilise these features.
  2. Once you have installed the App, you will get a new site map node “Resource Scheduling”, select this node
  3. Now click on Administration and then “Enable Resource Scheduling for Entities”
  4. You will be presented with the screen below, showing enabled entities and ability o enable a new entity.
  5. resource-scheduling-1
  6. In the Add entity, select the entity that you want to schedule, I am going to use Accounts, for scheduling an Account Update meeting.
  7. For the booking relationship, select create new relationship and if skill requirements are required select create new relationship for skills.
  8. Then select publish, this will enable the booking relationship and skill relationship for Accounts. This may take a few minutes to publish, be patient 🙂
  9. Once completed you will be presented with a final metadata setting screen for the new scheduling entity. Here you can select the appropriate statuses for the booking process, default booking duration, and the Longitude and latitude fields to be used in mapping. See below for my Account:
  10. resource-scheduling-2
  11. Update as required and save and close the metadata. Your entity is now set-up.
  12. To  schedule, navigate to your entity and you will notice a new command “Book” as below.
  13. resource-scheduling-3
  14. Select Book, and you will be prompted with the schedule experience
  15. Select your resource and book and close
  16. resource-scheduling-4
  17. You can see the booking by navigating to the new Booking resource booking associated view and the booked resource can engage with the booking.
  18. resource-scheduling-5resource-scheduling-6

That is it, easy as! Great work from the Dynamics Team!