Blog

Dynamics 365 Sales Adaptive Card🚀

Doesn’t matter how many times you tell a salesperson that input of data is important. They will always ask you what’s the output that I can look forward to. A few years back I remember gamification being important, but you normally need high volume of sales + many sales reps for it to be any fun. So in the constant pursuit of having some fun with sales I managed to find a new way of spreading some joy 😉

Adaptive cards?

If you are not familiar with Adaptive Cards, you are not alone. Adaptive Cards are configurable messages that can be delivered either within a chat or channel (plus many other services). The card is basically just a “custom page” that you create and send to the chat in Teams.

Kjør flyten.
Image from Microsoft Docs

Adaptive Card Configuration

Learning how to create adaptive cards isn’t all that hard. Head on over to https://adaptivecards.io/designer/ and begin designing your personal adaptive card. Because we are working with Teams, we choose the following.

  • Start by choosing the Microsoft Teams – Light or dark. Other configurations might not work.
  • Middle part is your actual card.
  • Left side are the components you can drag/drop to the center card.
  • Down low is the JSON we are going to copy paste once we are done with the visuals

Adaptive Card Samples

If you are as terrible as I am being creative, you can find tons of samples here.

Gif’s ‘R’ us 🙌

For the next step we want to get a random GIF from a GIF site. I have found an API for Giphy that seems to be working great.

Head on over to Gyphy API and create a new account. Then open a new app to attain an API key

Power Automate

Create a Team for the sales users, or just use the one you already have. Once you have found the right place for the adaptive card we can start the next process.

Open Power Automate and setup a flow to trigger once the Opportunity Closes as Won.

The first steps are pretty basic. When Oppty closed as won get the following pieces of data. These are standard Get Item by ID, so no need to dive into details here.

Next step is where it gets fun!!!

Add an HTTP step with the following text

https://api.giphy.com/v1/gifs/random?api_key=***ADD KEY***&tag=win

This will send a request to Giphy asking for a random GIF with the WIN tag.

Opening the URL in the web browser you will receive a LONG json back. The only text we need is the

Therefore we have to parse the Json to get the URL of the Original Image. If you don’t know how to do this, look for Power Automate Parse Json. Basically just copy the text above from the web browser, and open it in the “Generate from sample” part. This will automatically create the following Json Payload.

Last step to the process is adding the Adaptive Card to the Flow

The text in the adaptive card is what I copied from the adaptive card configurator on top 🔝

I could add the complete Json here, but all you need is your personal adaptive card inserted to this step.

Result – CHECK OUT THIS BAD BOY😎

It’s just a simple message in a chat, but this stuff really get the sales team going.. Now it’s a competition getting the funnies GIF, and most likes:) It’s not really gamification, but it sure is a lot of fun🎉😁🎈

Dynamics 365 App for Outlook button

Tiny blog for a tiny button 😂 This is only relevant if you have users that work in Outlook Web. Every now and then I do encounter a few Apple users that prefer the Outlook Web, even though it works well with Outlook for Mac.

Outlook client

If you use the Outlook client you know the button from the ribbon. Click the button do load the client.

Outlook Web.

OOTB the Dynamics client is hidden once it is deployed for the user. Only way to find it is to open the actual email and choose the ellipsis

Great thing is that we can change the order of the buttons:)

Solution

Open the Outlook Web settings and choose “View All Outlook Settings”.

Find the Dynamics 365 button in the Customize Actions and click save.

You now have the button easily accessible 🤗

🚨Update🚨 Automatic record creation rules NOW!

If you are using email to case, SLA or any Automatic Record Creation in classic you really need to update your rules ASAP to the new UI.

I can’t seem to find the message in the make.powerapps.com, but it’s one of the first messages that appears when opening the classic editor in solutions.

This post is not going to comment the pros/cons of the old vs the new. I will have to come back to you on that one. I am simply stating that you have to do this because it’s not only being deprecated, but it is being shut down. Microsoft has actually created a migration path for the rules, and documented the process fairly well.

https://docs.microsoft.com/en-us/dynamics365/customer-service/migrate-automatic-record-creation-and-sla-agreements

I use these rules for the most in the email to case scenario. First it has some conditions, and then it has the actual create of the case record.

When running through the migration, it does in fact get the conditions correct when migrating, but not the owner that I have in the create statement later. This has to be manually added to the flow created by MS.

Post Migration

After the migration is done, I had the following:

A record rule in the new UI

The conditions also got migrated without issues

And a new flow that Microsoft Autocreates for the email to case record creation. The red box marks where I had to add the “owner” field for the Teams ownership that I normally use.

All of these steps are automatically added by Microsoft. This is also the case if you do a NEW Email to Case from the UI. It feels a bit odd to put my faith in the hands of something automatically created, but for now I have to go with the flow.

NB!!! REMEMBER TO CLICK THE SAVE BUTTON IN FLOW BEFORE ACTIVATING THE RULE

So far it seems to be working OK, but I have to do some more heavy testing before I can conclude that the Flow is as stable as the old rules within Dynamics. We are running it in production, so I will update if I see any problems 🤞

SSIS – Dataverse for Teams DV4T

Earlier I wrote about connecting SSIS to Dataverse for Teams. At the time of writing the article it was not possible to connect to DV4T via KingsWaySoft and SSIS.

Dataverse for teams DV4T – Exploring Data Migration – CRM Keeper

I wrote about the theme because I still think it is highly important to merge some data to DV4T in some business scenarios from a Dataverse table. DV4T is essentially built for quick and agile projects, but these projects could need a little data from time to time to hit the ground running. Exporting / Importing data via Power Automate is in my book not a very solid option, and feels like a “work arround”.

In the recent update of KingsWaySoft they just released an Interactive Login Experience

Normally the best practice for SSIS and KingsWaySoft would be with an Application User. The only problem is that Dataverse for Teams doesn’t support application users. With the new type of connection the you have to manually add the username/password for each run. It retrieved a new token for each run.

How to set it up

Open your preferred SSIS tool and start a new connection manager. Notice that I have chosen the Interactive Login for OAuth Type.

Add the username and open “Select Organization”

I am not completely sure what the “Use SDK App” is for, but we have 2 factor authentication, and I had to activate this option for it to bypass the need for App ID.

Click on Retrieve and now we can see all organizations. Dataverse AND DV4T. The BlueberryAPI is a Dataverse for Teams database.

WAIT BEFORE YOU TEST CONNECTION! Click on OK

Right click on the connector and open properties

On the right side make sure you add the API 9.1

NOW you can test the connection 🤗

The results

This is what Dataverse for Teams looks like. 1 table called events.

This is what we see in SSIS 🙌🎉🎈

Big thank you to Daniel Cai for this💪

The rise of the Galleries🌌

By now I hope most people know the https://pcf.gallery (run by Guido Preite). A great page for sharing community components (PCF) and exposing awesome contributions to the rest of the world. 🌎

What I like about the PCF Gallery is the simplicity of the site only being about PCF components. This is why I asked Guido if we could create a similar site for other components regarding the Power Platform. He was so kind to share his code for the project, so Matt Beard and I decided to give it a go. 🤗

Connector Gallery

First out in list of future galleries is the CONNECTOR gallery . This site will contain all sorts of custom connectors for Power Platform that you can share with the community. If you want to contribute to this gallery, you only have to share the custom connector file you have on GitHub, and we will post it out!

Dynamics 365 Case add new contact missing

Recently I had this happen twice without really knowing why. The add new contact button was missing on the case form. In the old UI it was present, but in the new UI it was gone.

Problem

Luckily support found out that this is caused by the contact field containing some old “metadata”. All you have to do is remove it and add it back.

FIX

As you see here we have added the same field twice.. Now you can remove the “OLD” contact field and then publish..

Voila!

A pretty random thing to happen, but an easy fix:)

Dynamics / Dataverse Environment Variables in Power Automate

There have been several posts on the environment variables, but I think Microsoft just released a pretty GREAT update recently. I honestly don’t have a clue when this function was released, but it made my day a LOT easier:) This is how we used to refer to Environmental Variables:

Using Environment Variables in Dynamics 365 CRM – Part 1 | Microsoft Dynamics 365 CRM Tips and Tricks (inogic.com)

Using Environment Variables in Dynamics 365 CRM – Part 2 | Microsoft Dynamics 365 CRM Tips and Tricks (inogic.com)

Basics

When moving solutions from system A to system B we often have hardcoded values in workflows/flows/javascripts etc. These cause problems because the fields often have different values in each environment.

Sure you can migrate variables/records between systems and be sure to never overwrite, but it can be time consuming to maintain.

Microsoft has introduced environmental variables to Dynamics / Dataverse to fix this exact problem. You create a new Environmental variable in your solution, and you can se the value for each environment. Within CRM you can refer to the environmental variable instead of hardcoded values:)

Within the solution explorer you can add Environmental variables that can be used across the different systems. In this test I am using a variable to define what environment I am working in “Test or Production”.

I wont be writing about the Environment variables in detail, as you can read more about them in other posts, but I wanted to cover the new way of using this within Power Automate!

Accessing the Environmental Variables in Power Automate Flow

Start by creating a new Power Automate, and add compose function

Check out that bad boy! 🤗😎 No longer need for get record calls from entities etc. A nice improvement that will save a few minutes here and there.

Power Automate – finding Dataverse environment URL

There are many ways of getting the current environment URL, but this is the quick and dirty version of doing just this 😏 Next week I will post about Environment variables as I know this is a possible approach that is better.

The intention about this blog is to show how to use Json to parse just a small part of an action body to get what you want exposed.

Power Automate

So this could be a typical flow in Power Automate for Dataverse. We have a trigger on top and an action below to get more data from the element that triggered.

The BODY of the trigger doesn’t contain environment information, but only Opportunity data:

But the Action contains a lot more interesting data for this.

In order to get this data we need to parse the Json returned here to retrieve the “Odata.ID” that includes the URL for our environment.

{
    "type": "object",
    "properties": {
        "@@odata.id": {
            "type": "string"
        }
    }
}

Now you can store the string returned in a String Variable

Running the Power Automate

When you run the Power Automate the the variable Environment will now include the URL of the system running. From here you can use string variables in a formula like:

IF “Environment contains org.crm4” etc.

In my next post I will show how the environmental variables functionality in Dataverse / Dynamics, and how we can use this for the same purpose 😀

Dynamics 365 Teams Document Locations – Where art thou?🤷‍♂️

Even though we all wish it wasn’t so, Document Locations still rule the integrations between Dynamics 365 and SharePoint. I’m not saying that I have a better idea what would be a smarter way of solving it, but it all seems a bit “2011” ish.

Last week I encountered a problem with the Document Locations for Teams, and I was surprised when I couldn’t find them in the Document Locations at first. The list only contained the SharePoint sites that the standard SharePoint connector uses.

In this list I was missing all of the Teams locations. Turns out that the view is only showing Active SHAREPOINT locations.. hehe

All you have to do is add the “MS TEAMS” to the search, and you should see all of the document locations for that also

Dynamics 365 + Teams integration error

Recently ran into a problem with the Teams integration OOTB, where the integration continuously threw an error after connecting the Dynamics record to the Teams.

This is a pretty Vanilla environment, so I couldn’t quite figure out what was wrong. I obviously could see that the URL was wrong, but I didn’t understand WHY it was wrong.

https://**.sharepoint.com/sites/SuperCards/Shared%20Documents/General <- Nothing really wrong with this URL at first site.

After a lot of painful digging I finally found the issue. Someone had decided to install SharePoint in Norwegian when they first setup the tenant!!! hehe. This meant that the URL the SharePoint URL was wrong.

Wrong URL ⛔

Correct URL ✅

Solution?

Microsoft Support didn’t see a fix in the near future for language support, so I guess it’s time for a small work around 🙂 Not really exciting fix, but you need to create a Workflow or Power Automate on create to change the name of the document location to your local language.

Why a workflow you may ask? When is the last time a workflow failed you I answer 😎