Quick Action from North52 is a ready-to-go solution that allows your users to make decisions and update Dynamics CRM/365 records direct from their emails.
Your users must be signed into Dynamics CRM/365 as Quick Action uses their credentials.
Note: This functionality will be publicly released at the end of February 2017.
- A North52 Formula generates HTML buttons that are inserted into an email to a user
- The user clicks on the chosen button
- The button is a URL link that takes them to a web resource in Dynamics 365 and executes their decision
- North52 Quick Action Web resource
- 2 North52 formulas
- Ensure N52 BPA v22.214.171.1240 or higher is installed
- Download the solution file from the app home page
- Logon to CRM and navigate to the solutions list
- Click import and choose the downloaded solution file to import
- Take all the default options during the install process
- After the import completes click 'Publish All'.
How to configure Quick Action
Step 1 : The HTML Buttons
For demonstration purposes we are going to use the Scenario of approving a quote via email.
Create a formula of type Process Genie on the quote entity.
Ensure the Display Format is set to String.
We use the North52 Function CreateHTMLButton() to generate the 2 buttons (1 to Approve and 1 to Decline).
The CreateHTMLButton() function takes the following parameters:
- URL of the CRM instance
- Quick Action Web Resource Name
- Short Code of the Formula Quick Action should execute
- GUID of the record to be updated by Quick Action
- Entity name of the record to be updated by Quick Action (e.g. quote, contact, lead, account)
- Button Text
- Button Height
- Button Width
- Button Font Size
- Button Font Format (e.g. bold, italic)
- Button Text Font
- Button Background Color*
- Button Text Color*
- Button Float**
- Padding between the buttons
- Parameters to be passed into the button***
* These can be words like green, red, blue etc. or hex colors like #CC0000
** Float controls how the buttons will appear, left makes them appear in a line, none means they appear on different lines.
*** Parameters are entered using the SetQueryString() function. They are entered in 'name', 'value' pairs, you can add as many pairs as you wish. The first value is the message you want to appear in the title bar of the Quick Action. In the following examples 'Quote : Approve' is used as the message, but you can set any message you wish here.
The functions will generate the HTML code that is inserted into your emails.
Below you can see 2 buttons being created one to approve a quote, the other to decline the quote.
Create a workflow in Dynamics CRM and add a North52 Process Genie step to it.
Configure the Process Genie to use the formula you just created by using its shortcode.
When the Process Genie executes it will generate the button HTML that can then be inserted into the email.
Use the Send Email workflow step and populate it like the below
When you are finished the workflow should look like the below.
Back on the Quote record your use triggers the workflow
When the workflow finishes it will generate the email
Note: Because the float is set to None the buttons appear vertically. If the float is set to Left the buttons would appear horizontally.
When the user clicks on one of the buttons it opens up their web browser and takes them to the Quick Action Web resource running on Dynamics CRM.
The navy colored Title bar contains two words : the first word identifies the entity being updated, the second word identifies the command being passed to it.
Under the Title bar is the message section. ‘In Progress…’ is the message displayed when Quick Action is executing.
The user can open the specific record and close the window when they are done using the links.
The Message Section is very important as this is where you tell your user what has happened when the Formula executed.
The Second Formula
As we have seen, the first formula is used to create the buttons that use to send to the user. They click on a button and it takes them to the Quick Action screen.
This then triggers the second formula which carries out the instruction and returns a response back to the end user.
The second formula is configured as a ClientSide – Calculation formula. This type of formula carries out it's task server side and then returns a response back to the web client that called it.
Below is a very simple example of the formula we will use to update the quote record.
Remember back in the first formula we used the function SetQueryParameters() to put the values for ‘approve’ and ‘decline’ into the buttons?
Since ‘choice’ was the name given to the parameter, it is now accessible from within the second formula as North52 BPA creates a 'virtual field' on the entity that can be accessed during the formula execution.
In the sample shown above, the case statement will match choice with ‘approve’ and will execute the UpdateRecord function.
Your user will see the above when the formula is completed. Quick Action Completed! Is the generic response message when the formula has completed.
If they attempted to click on the link again… then they will see the following
This error message is quite 'techie' and it doesn’t really explain to the user what has happened. With Quick Action you can customize your response messages to make things clearly for your end user.
Setting Custom Response Messages
Since the formula type is set up as ClientSide – Calculation we can control the message that is being passed back to the user.
We would need to enhance the formula more to carry out the task and return a value. As the Then() function on a Case statement supports multiple instructions* we add the action and then the response statement. When the Then statement executes, it will set the state of the quote to active and then return 'The Quote has been set as Active' to the end-user.
*Note: Then() supports multi-statement on N52 BPA versions 510 and above that are running on Enterprise or Ultimate licences.
In the below example we will set customized messages for when the Quote has been set to active or cancelled by the user.
We can restructure the Case() statement as a Case(true) which we can then use for more complex logic.
Below I have added a check on the state of the Quote record so that if it is already in an Active state it will return the already Active message. If it is not Active it update the record and return the set to Active message.
You can see here that when I attempt to approve a quote a second time, I get the already Active message instead of the 'techie' error message seen earlier.
Quick Action uses the CRM credentials of the end user which means that in any Audit History etc. it will show the user that carried out the task e.g. set the Quote to Active.
However, you can increase security around the execution of the formulas if you want using Security Roles.
In the below example I am using the standard Sales Manager security role to control who can approve or decline the quote
Note: The WhoAmI() function tells the function who is executing the function.
If someone attempts to trigger the Quick Action without being a Sales Manager they will see the below error message.