Workflow Elements

Current Version: 0.9.6.1, released January 10, 2017

Workflow Elements is a free solution for Dynamics CRM that gives you the tools for you use workflows in ways you never thought possible. You can query for records (even filtering it to related records), insert tables into emails and tasks, format dates any way you want and more, all with a clean, easy to use interface.

In less than 5 minutes you can write a workflow that sends a fully customized itemized receipt to a customer with all of their product information. Normally you’d have to find a developer to write custom code for you (or overpay for a solution that might work), but not anymore. Get everything you can out of CRM with Workflow Elements, available for CRM Online, 2011 , 2013, 2015 and 2016.
button_dl16_online

button_dl13_15

button_dl2011

I’m always looking for new ways people are using Workflow Elements so leave a comment or hit me up on Twitter (@AidenKaskela). If you experience any issues, check out the Reported Issues page to let me know so I can get it fixed.

What are workflow activities?

A workflow is a set of instructions that you combine to give CRM functionality to suit your business needs (Trigger: When an invoice is paid; Check: If the customer is an individual; Action: send an email confirmation). A workflow activity is one of the instructions, like a tool in the toolbox. Microsoft provides a lot of tools to let you do basic actions, but we need so much more. Fortunately, they’ve provided a way to expand on that with custom workflow activities.

A custom workflow activity can have input parameters and output parameters that you can interact with in your workflow. Having these simple mechanics available lets you build limitless custom activities. Whether it’s as simple as a math problem (you need to take in a number and return the square) or a complex integration, custom activities open up a whole world of customizations for the CRM user or Admin.

What activities come with Workflow Elements?

  • Sales – Add Product to (Invoice, Opportunity, Order or Quote) – User Suggested
    • What is it?
      • Lets you dynamically add line items to invoices, opportunities, orders and quotes. Out of the box you could only create the order but not add anything to add! Not any more.
    • Where would you use it?
      • Any place where you want to create line items through a workflow. Maybe you want a manual workflow to create an order and add X products to it, or create a new opportunity from a customer when an event happens in CRM.
  • Sales – Convert Order to Invoice and Convert Quote (Won) to Order
    • What is it?
      • A couple of workflow activities that let you more sales records along the pipeline. If you start with a quote you can create an order, and from an order create an invoice.
    • Where would you use it?
      • I’ve worked with customers that want to create an order for a customer and automatically invoice them. With these activities, you can create a new order, add the line items, then generate an invoice all in a single workflow.
  • Math – Analyze Data Set
    • What is it?
      • Given a query with number column, it’ll give you statistical information about the data set, like Mean, Median, Min, Max and Standard Deviation.
    • Where would you use it?
      • This is an easy way to get information where numbers are concerned, especially around sales. Get the average order amount for a given customer, that largest order in the past month, etc.
  • Math – Determine Ratio
    • What is it?
      • Given two numbers, reduces the values as a ratio,
    • Where would you use it?
      • Any time you would want to get the ratio of two numbers – how many leads per sale, how many total opportunities per win, etc.
  • Date – Add or Subtract
    • What is it?
      • Given a Date Time field, you can add or subtract any time units from it. This is different from the out-of-the-box date modification because this lets you use the results in your workflow.
    • Where would you use it?
      • You want to set a reminder to 60 days from now, 61 if it’s a Sunday. You would use this activity to get a date of today + 60, check if it’s a Sunday (using Get Date Parts) and if so, use this again to get modified date + 1.
  • Date – Build Date from Parts
    • What is it?
      • Will take the different components of a date (day, month, year, hour and minute) and return a Date Time value.
    • Where would you use it?
      • This is great when you want to do date comparisons on an abstract date. For example, “This Fiscal Year” may start 1/1 of this calendar year. You could get the current year from “Date – Get Date Components” and build up the first of the current year by passing in 1, 1, and the Year. Now you have a Date Time value that CRM will compare to other  Date Time fields.
  • Date – Convert to Custom Text
    • What is it?
      • One of my favorites because of how flexible it is – pass in a Date Time field from CRM and get that back as a text, formatted any way you want it. You can even convert it to a different time zone (or the time zone of the user running the workflow).
    • Where would you use it?
      • You want to send an email with a date but you don’t want the standard date-only format that CRM offers. Format the date however creatively you want:
        • 20161128 2214
        • November 28, 2016 10:14PM (GMT-05:00) Eastern Time (US and Canada)
        • Monday, November 28, 2016
  • Date – Get Date Components
    • What is it?
      • This takes in a date time and gives you information about that date that CRM doesn’t, like the day of the week, the number of the day of the year (for ordinal/Julian dating), and date parts to easy use Check conditions.
    • Where would you use it?
      • You want to set a follup for a quote to 30 days from now, but if it’s Saturday or Sunday than make it the following Monday.
      • If something happens in November… You can’t check that out of the box because you always need to specify a year.
  • Documents – Email an Attachment
    • What is it?
      • This activity will let you attach a note document to an email based on some criteria (filename contains .docx, created in the last 10 minutes). This is ideal for workflows that create documents that you want to send in an email.
    • Where would you use it?
      • You have a workflow that generates a Word document from a Word Template, and you want it automatically emailed to the primary contact.
      • A workflow to generate a word template when an opportunity is won, and send to everybody on the sales team.
  • Documents – Rename Attachment – User Suggested
    • What is it?
      • This activity will let you rename an attachment based on some criteria (filename contains .docx, created in the last 10 minutes). This is ideal for workflows that create documents with a generic name, such as Word Templates
    • Where would you use it?
      • You have a workflow to generate documents from a Word Template but they always get the name of the template. Call this activity afterward to give it a dynamic name based on today’s date.
  • Emails – Add Recipients from Query – User Suggested
    • What is it?
      • Lets you add recipients to an email based on a query (including limiting to just related records). The query can be on any record type that can be an email recipient – contact, account, user or any other entity marked with Sending Email.
    • Where would you use it?
      • When an opportunity is won, email the sales teams congratulations, and CC their managers. Step by step instructions at How to: Add dynamic recipients to an email
      • An account is updated and you want to email everybody related to the account with a certain connection role.
  • Emails – Send a Draft Email
    • What is it?
      • This is a supporting activity – after you add recipients to an email you need to use this activity to send it.
    • Where would you use it?
      • If you need to create an Email and send it later in the workflow (like if you want to add dynamic recipients or attach files), you’ll need this activity to send the email when you’re done.
  • Query – Get a List
    • What is it?
      • Similar to querying for a table, this activity lets you query CRM and gives you a list of results instead of a table.
    • Where would you use it?
      • Get a list of the dates of past purchases by a customer.
  • Query – Get a Single Value
    • What is it?
      • Incredibly powerful tool to let you query CRM and get back the result as a typed value (ex: query for a number and you get back a number value, money returns money, etc). If you use this with FetchXml for data aggregations and workflow logic, it’s the best activity you’ll ever use.
    • Where would you use it?
      • Get the total amount of orders from a customer in the past year, and if it’s more than $10,000 then send an email using a different template (the big spender template).
      • Get the largest open opportunity for a customer.
  • Query – Get a Table (Custom Styles)
    • What is it?
      • Allows you to query CRM and use the results of the query in your workflow. This activity is identical to ‘Query – Get a Table (Default Styles)’ except you can specify your own color schemes using hex codes.
    • Where would you use it?
      • When an invoice is paid, send the customer an itemized receipt.
  • Query – Get a Table (Default Styles)
    • What is it?
      • Allows you to query CRM and use the results of the query in your workflow. The resulting HTML table uses the default styles, so the input parameters are greatly simplified relative to ‘Query – Get a Table (Custom Styles)’
    • Where would you use it?
      • If an invoice has products that are marked as Shippable (custom field), create a task to send the products and include a table of the shippable products and their quantity.
  • Workflow – Get Metadata
    • What is it?
      • This is one that, as a developer, I love. This activity will give you all the information about the workflow that CRM should make available but doesn’t. Things like “Who is running the workflow?” and “What’s the ID of the record?”
    • Where would you use it?
      • You need to know who the workflow user is.
      • You want to know the ID of the record the workflow is being run on.
  • Workflow – Run on Query Results – User Suggested
    • What is it?
      • This activity will let run a workflow on a query of records from your workflow. This can be limited to records related to the main workflow entity.
    • Where would you use it?
      • When a contact address is updated, run a workflow on all of their active invoices to change the address.
      • When a field on a quote changes, run a workflow on the quote details.

14 thoughts on “Workflow Elements

  1. It would be great to use the Query feature to prepare a list of people (through some complex parameters, fetchxml) and put that list as Recepients

    Like

  2. Yes, just one email with fixed text, for scenarios where recepient list can only be gathered by running some fetchxml query. right now in workflow we can only choose hard coded people through lookup or need to have separate lookup fields on the entity for as many recipients.

    Like

  3. Related to the above, my biggest headache with workflows is when an entity has many related records e.g. A quote and quote products. You want to update a quote product while running a workflow from the quote and apply a change to a related quote product (or all related quote products) based upon a criteria. Ability to start a child workflow where the input parameter of the child workflow is the quote id where you are running the first workflow from would help. So in that way on child workflow first check criteria could be where parent quote I’d = quote id from parent workflow. This is pretty much impossible for me out of the box. Or did I miss something?

    Like

    • Daniel, that sounds really cool. How about a step where you can pass in a workflow to run and a query for records to run it on? The query could be limited to records just related to the workflow record too (described in How to: Limit query result to related records).

      Like

  4. Have a look at North52 formulas. I haven’t come across a problem that I haven’t been able to solve using it. At my current client we are using it to write some seriously complex business logic, including integration to SAP. the logic is written using an easy to understand language and has a ton of functions including fetchxml support

    Like

    • I’ve seen North52 before and it’s pretty impressive what they’ve built (and they charge accordingly). I’m not trying to build a workflow package to do everything for everyone; I want to build a simple solution to let the average non-technical user do some really cool things that should be available out of the box.

      Like

  5. I like this workflow solution as it gives you more control and it’s a simpler setup. With North52 solution what happens is that they add so many plugins and steps as part of scheduled formula that it affects overall system performance.

    Liked by 1 person

  6. Hi Aiden-

    This solution is absolutely amazing. Thank you for taking the time to write this AND take requests for additions! We’ve just scratched the surface with this, but we’re already using it for weekly alerts to users for overdue follow-up, weekly activity emails to the sales managers, shipment notifications with line item detail from the invoices, sending quotes with the line item details to contacts and emails to our customers with all of the contacts in their organization so we make sure we keep the contact information clean and up-to-date.

    THANK YOU!
    -Joe

    Liked by 1 person

  7. Hi Aiden,

    I’ve attempted to use the “Get a Table (Default Styles)” to send an email with the invoice products related to a the parent Invoice but instead I get an email with all Invoice Products in my system. Would you happen to know where I might have went wrong in my setup?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s