Tag Archive for: Power Automate

In Dynamics 365 Sales, duplicate detection exists but only works at an individual level, for example, when a lead is converted or a new account is created.

Unfortunately, there’s no out-of-the-box solution to automatically detect duplicates in bulk across the system. This limitation can lead to data inaccuracies, especially as your organization grows.

To overcome this challenge, I created a Power Automate flow that finds and merges duplicate accounts automatically.

In this article, I’ll walk you through how to create this flow, and you can adapt it for your own needs.

Flow overview:

(Apologies, I have not renamed some of the foreach and conditions, but I think you will understand 🙂 )

Step-by-Step Guide to Creating the Flow

Step 1: Set up the Trigger

The first step is to set up the trigger for the flow. We want this flow to run on a regular schedule to detect duplicates. Use the Recurrence trigger to specify how frequently the flow should run (e.g., daily or weekly).

Step 2: Query Accounts from Dataverse

Next, add an action to list all accounts from the Dataverse. This will retrieve all active accounts so that we can compare them and detect duplicates.

  • Action: Use List Rows from the Dataverse connector.
  • Filter: You can filter for only active accounts or specific criteria that make sense for your business.
  • Also initialize the variable Duplicates here as an array

Step 3: Identify Duplicate Accounts

Once the accounts are retrieved, you need to compare the names or other unique fields to detect duplicates.

  • Use a loop to go through each account and check for duplicate names.
  • Clear the array variable Duplicates
  • Implement a condition in the flow to identify if two or more accounts share the same name.

The Replace() is used to fix the acounts that have the character inside their name, to not break the odata filter.

Condition:

and(greater(length(outputs(‘List_rows_2’)?[‘body/value’]), 1))
If any duplicate is found (YES under condition), add the Account ID to the Duplicates array

Step 4: Merge the Duplicates

Once duplicates are identified, use Dataverse’s Unbound Action to merge the duplicate accounts. The unbound action allows you to merge records within Dataverse without having to handle the data manually.

  • Action: Use the Perform Unbound Action step from the Dataverse connector.
  • Target: The original account and the duplicate account.

Condition 3: (meaning one or more duplicates have been found)

length(variables(‘Duplicates’))
If YES, then take the first and the last account:
(Because you can only merge 2 accounts at the same time)
Get the first Account:
Get the last duplicated account:
Send me an email notification, and then do an Unbound Action (Merge):
That’s it, our entire flow is ready:
AccessOrange is a leading Microsoft Partner that specializes in Microsoft 365, Dynamics 365 and Azure to help our customers work smarter.
If you need help with building this flow in your own environment, leave your contact information below, and we will contact you as soon as possible.

"*" indicates required fields

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
This field is for validation purposes and should be left unchanged.

Are you considering transitioning your organization from on-premise to online?

Are you already familiar with the basics of Microsoft 365?

If so, then it’s time to take the next step in smarter working with Microsoft 365 by utilizing Forms, Power Automate, and Lists.

Creating simple solutions is within reach!

One example of such a solution is a digital suggestion box, which can be built in three steps:

1. Create a form to collect ideas using Forms.

2. Set up a flow to store the ideas using Power Automate.

3. Create a list for all the ideas, including additional columns to track their progress, using Lists. Optionally, apply one of the many automation and integration possibilities.

Microsoft Lists:
Microsoft Lists provides lists for individuals and groups. These lists can be accessed from various devices and through different apps, including Microsoft Teams, allowing you to stay connected even when you’re on the go.

Adding columns and views to your lists is easy, and you can customize the formatting to make them visually appealing and organized.

Collaborating on a list is straightforward. Lists can be shared, have version history, and offer the ability to add comments to each item.

Integrations with other apps are easily accessible. With a few clicks, you can set up automatic email notifications for changes. Power Apps enables the creation of custom forms, while Power BI allows for quick reporting based on the list data. Power Automate enables automation based on the content of the list.

In a similar way, solutions can be created for tasks such as:

  • Requesting training sessions, including approvals.
  • Registering visitors, including confirmation emails.
  • Reporting system bugs, including status updates.

These types of solutions are enjoyable and achievable for advanced users. They enable more effective and efficient work processes.

  • Forms provide more comprehensive and structured input for a process.
  • Flows automate a portion of the work.
  • Lists offer an overview and generate new insights.
  • The data remains within the Microsoft 365 environment, which is already set up.
  • Licensing costs for third-party solutions can sometimes be eliminated.

Get started with a workshop

Initiating a structured approach to smarter working with Forms, Power Automate, and Lists is a great idea for any organization. It benefits users and promotes collaboration with IT.

AccessOrange can provide support in this endeavor, including workshops. A workshop involving advanced users and IT staff helps identify possibilities and opportunities in an engaging manner.

  • First, we provide a brief introduction to Forms, Power Automate, and Lists.
  • Next, participants create a digital suggestion box.

With proper guidance, this process is quick and satisfying, giving participants their first glimpse of the possibilities.

We then discuss the potential opportunities, and participants quickly come up with simple solutions they can create themselves.

After the workshop, we maintain contact because during the session, participants express their intentions to work smarter with Forms, Power Automate, and Lists.

  • Will they actually start implementing these ideas?
  • Would they benefit from IT support?
  • Will users or the IT department effectively manage the solutions?

After an initial period of use, these questions warrant further discussion with the participants who have started implementing the solutions and with the IT department.

 

Is this an interesting next step for your organization?

Together with my colleagues, I am committed to promoting smarter working with Microsoft 365 for users and administrators. We gladly provide workshops like these and offer ongoing support!

Andy Chan

Microsoft 365 Consultant

Let us help you Get Started

"*" indicates required fields

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.
This field is for validation purposes and should be left unchanged.

 

Dynamics 365 Sales provides businesses with a centralized platform to manage their customer interactions, account information, and sales processes. With Dynamics 365 you can keep track of your customer accounts and contacts by allowing your team to store and access all customer-related data in one place.

In Dynamics 365 Sales it is possible to link contacts to accounts. This feature allows you to associate individual contacts with their respective customer accounts, allowing for a more comprehensive view of customer interactions and relationships.

By linking contacts to accounts, you can easily access information about an individual contact’s role within their company, as well as view a complete history of interactions with the entire organization. This information you can use to personalize interactions with customers, track the progress of opportunities and deals, and make informed decisions about future sales and marketing efforts.

Unfortunately, the process of linking contacts is a manually process, where the user who creates the contact have to manually select to which account it belongs. This manual process is time consuming, and often is forgotten along the way, making your CRM database less effective.

Therefore we have come up with a solution to automatically link your customer contacts to your accounts via Power Automate!

The solution to automatically link your contacts to your accounts with Power Automate

First of all, we assume that all your contacts have an email address, and that your customers all have a unique email domain (which should be reasonable!). We will use this email address to build a relationship between your Account and the related contacts.

First of all, we will create a custom field called “email domain” under our account card. Here is an example:

In this field, we will input the email domain of the customer. This will be used in our Power Automate script to link all the individual contacts to the Account master.

Step 1 – Create custom field for email domain

Go to Advanced Settings

Under Settings, click Customizations

Click Customize the System

Under the customization screen, find the entity Accounts and go to Fields

Here we will add our new email domain field by clicking on New 

Create the field name, and configure the settings as below

Click Save & Close and return to the previous screen

Now we will go to the Forms section and add our custom field to the accounts form

Note that you can also add the field on other forms if you want, for example the Account Quick Create, so when your sales team creates a new account via outlook, they also will be able to enter the domain field there.

Find your email domain field on the right and drag it to the location you want to have it on the form.

Click Save and Close

Click Publish All Customizations

Now you have the email domain field on your account card, where you can enter the email domain of the customer!

After this step we can now move on to the Power Automate Script.

Step #2 – Power Automate Script to Link Contacts to Accounts

Go to Power Automate and create a new flow

Click Build your Own

We will use a scheduled trigger to keep things simple, so every day our new contacts will be linked to their master account.

Go into the flow and start adding the next step

Next we need to filter out all the accounts where the email domain is not empty:

Next is we need to create an Apply to Each loop so we loop through all the records that we found. We can simply start by adding a Compose to our next step, which will automatically create the loop. We can put our email domain field in the compose.

Next, we want to handle multiple entries in the email domain field. We imagine that some accounts may have multiple email domains, hence we will fill them in under the new field as: domain1.com,domain2.com,domain3.com.

In order for our power automate to process them all, we need to first split our field into separate variables and then loop through them. We first split the string into an array by doing a compose with a split command.

After that we will create another loop by creating an Apply to each on the compose output.

Now we have created the loop neccesary for going through all the acounts and all respective email domains.

The next step is to retrieve all the contacts that have the current selected domain in their email address, and are not yet linked to the Account.

We can do that with a Dataverse List Rows command, and a filter.

Now we have all the contacts that are not yet linked, so we can loop through them and link them.

We start with creating an Apply to All by adding a Compose (the easy way to create an apply to all)

Next we do a quick check if the Contact has not been linked to another account already. (As sometimes maybe user may have an email from a domain linked to customer A, but somehow may still be related to another account in your Dynamics, so we need to check if he/she has not been linked already to another account)

If the Parent Customer ID Value is null, it means the contact is not yet linked and we can proceed with linking it to our Account via a Dataverse Relate action.

We add one more Send Email flow to inform ourselves of a succesful link.

And we are done!

Now we can run the flow and we can see that all the contacts with the same email domain have been succesfully linked:

Complete Flow

Here is a screenshot of our entire flow:

Questions? Leave a message below.

We can also help you build this (and other) flows. Contact us via [email protected] if you need assistance with Power Automate or Dynamics 365 Sales.

 

 

 

Dynamics 365 Sales is a customer relationship management (CRM) software solution that is part of the Dynamics 365 suite of business applications. It is designed to help sales teams manage their relationships with customers and prospects and streamline sales processes. With Dynamics 365 Sales, salespeople can access customer data and interactions from a single platform, track sales activities and opportunities, automate tasks, and collaborate with other team members and departments.

Dynamics 365 can be used by Microsoft Power Automate to automate almost anything within Dynamics 365. Dynamics 365 and Power Automate together, make a great combination for further enhancement of your sales process.

In this example we will teach you how to use Power Automate to send a message to your sales staff via Microsoft Teams when a price change has been detected in a Dynamics 365 Pricelist.

Step 1: Create new Power Automate Flow

Go to https://make.powerautomate.com/ and click on “Create”, and select “Automated Flow”

Step 2: Enter Flow name and select Dataverse

Give the flow a name, and search for “dataverse” and select “When a row is added, modified or deleted”

Step 3: Configure Trigger that will start up our Flow

On the next screen we will configure the trigger. We will configure the Change Type to “modified” to ensure that the trigger only runs when a price list has been modified.

Table name: Price List Items (as we want to target Price List Changes in this case)

Scope: Organization (We want this flow to run for the entire dataverse organization, not just our user scope)

Step 4: Get details of product thas has been modified in the price list

First we need to get the record of the Product that had a price change. We will add a new action to our flow and search for “dataverse” and select “get a row by ID”

We will select the table name “Products” and for Row ID we will select “Product (Value)”

Step 5: Get Price List Currency

In our case we have price lists with different currencies, hence we will need to retrieve the actual currency of the pricelist.

We do that again with a Dataverse : Get Row by ID and select Currencies and Row ID: Currency (Value)

Step 6: Create Chat Message

Since the Teams “Post message in a chat or channel” is sometimes buggy when it comes to message layouts, it is recommended to draft your message in a compose, and parse the compose to the next step.

Here is our chat  message including a little layout tweaking such as adding <strong> </strong> to make some letters bold.

We want to show the product code, which in our case is a custom field named “Product ID”.  The amount is the local amount from the price list, for which we add the Curency as well in order to be complete.

Step 7: Post Message in a Chat or Channel

Now we can do the final step, which is to post our chat message in a group chat or in a channel. In our case we have a chat specifically for our sales team, where we want to post the message in.

The actual message is the output of our compose in step 6

When you’re done with above, the entire flow should have the following elements:

Now you can test your flow, and (hopefully) it should work. Here is an example of how it looks on our side:

Great Work! Feel free to reach out if you have any issues or questions regarding above flow.

Power Automate is a powerful tool that allows users to automate various processes and tasks within their organization. This can help to save time, increase efficiency, and reduce the risk of errors. Some of the key benefits of using Power Automate include the following:

  1. Increased productivity: By automating routine and repetitive tasks, Power Automate can help to free up time for more important and value-added activities. For example, instead of spending time manually entering data into a spreadsheet, Power Automate can be used to automatically transfer data from one system to another, eliminating the need for manual intervention.
  2. Improved accuracy: Automating tasks can help to reduce the risk of errors, as there is no longer a need for manual data entry or other manual processes. This can help to ensure that the data is accurate and consistent, which is important for making informed decisions.
  3. Better collaboration: Power Automate can be used to automate the sharing of information and documents within an organization, making it easier for teams to work together and collaborate. This can help to improve communication and coordination, leading to better outcomes.
  4. Greater flexibility: Power Automate allows users to create custom automated processes that can be easily tailored to their specific needs and requirements. This means that users can design and implement processes that are tailored to their specific business needs, making it easier to adapt to changing circumstances.

Example Use Cases

Some examples of how Power Automate can be used to benefit an organization include the following:

  1. Automating the onboarding process for new employees: Instead of manually collecting and entering information about new hires, Power Automate can be used to automate the process. This can involve sending emails to new employees, updating HR systems with their information, and assigning tasks to the appropriate team members.
  2. Automating the generation of reports: Instead of manually collecting data and creating reports, Power Automate can be used to automatically generate reports on a regular basis. This can involve pulling data from multiple sources, applying any necessary calculations, and formatting the report in the desired format.
  3. Automating the process of sending out marketing emails: Marketing teams can use Power Automate to automate the process of sending out newsletters, promotional emails, and other marketing communications. This can save time and effort, allowing the team to focus on other tasks.
  4. Automating the process of reconciling accounts: Financial teams can use Power Automate to automate the process of reconciling their company’s accounts. This can improve accuracy and reduce the risk of errors, ensuring that the financial data is always up-to-date and accurate.
  5. Automating the process of sending out project updates: Project managers can use Power Automate to automatically send out updates to team members when a project is updated. This can improve collaboration and communication within the team, ensuring that everyone is always up-to-date on the latest project developments.
  6. Automating the process of backing up important data: IT teams can use Power Automate to automate the process of backing up important data. This can ensure that the data is always protected and easily accessible, reducing the risk of data loss in the event of a disaster.
  7. Automating the process of scheduling meetings and appointments: Administrative staff can use Power Automate to automate the process of scheduling meetings and appointments. This can save time and effort, allowing them to focus on other tasks.

License Requirements

To use Power Automate, you must have a valid license. There are different types of licenses available for Power Automate, each of which provides access to different features and capabilities. The specific license you need will depend on your specific needs and how you plan to use the service.

One common license for Power Automate is the Microsoft 365 Business Premium license. This license includes access to Power Automate, as well as other Microsoft products and services such as Office 365, Exchange Online, and SharePoint Online. The Microsoft 365 Business Premium license is suitable for small and medium-sized businesses that want to automate their processes and improve productivity.

Another common license for Power Automate is the Microsoft 365 Business Standard license. This license includes access to Power Automate, as well as other Microsoft products and services such as Office 365 and Exchange Online. The Microsoft 365 Business Standard license is suitable for small and medium-sized businesses that want to automate their processes and improve productivity, but do not need all of the features and capabilities included in the Business Premium license.

Finally, the Microsoft 365 E1 license is another option for Power Automate users. This license includes access to Power Automate, as well as other Microsoft products and services such as Office 365, Exchange Online, and Skype for Business. The Microsoft 365 E1 license is suitable for organizations that want to automate their processes and improve productivity, but do not need all of the features and capabilities included in the Business Premium or Business Standard licenses

In conclusion, Power Automate is a valuable tool for organizations looking to save time, improve productivity, and work more efficiently and effectively. By automating repetitive and time-consuming tasks, it can help teams to focus on more important tasks, improving overall organizational performance.

How can we help?

A Microsoft Partner Such as AccessOrange can help with the development of Power Automate flows in a number of ways.

For example, a we can assist with the design and implementation of Power Automate flows by providing guidance on best practices and offering expertise in specific areas such as data integration, business process automation, and user experience design.

In addition, we can help with the deployment and management of Power Automate flows, including setting up the necessary infrastructure, integrating with other systems, and providing ongoing support and maintenance.

Overall, working with a Microsoft partner such as AccessOrange can help organizations to maximize the value of Power Automate by leveraging the partner’s expertise and experience in implementing and managing these types of solutions.

For more information, contact us at [email protected] or chat with us on our website.

Dynamics 365 Sales is a cloud-based CRM solution that enables salespeople to build strong relationships with their customers, take actions based on insights, and close deals faster. With Dynamics 365 you can manage your customer relationships, from first contact (lead) to qualifying (opportunity) to deal (Quote/Order).

Dynamics 365 can be used by Microsoft Power Automate to automate almost anything within Dynamics 365. Dynamics 365 and Power Automate together, make a great combination for further enhancement of your sales process.

In this example we will teach you how to use Power Automate to send a message to your sales staff via Microsoft Teams when a new lead has been assigned to them in Dynamics 365.

Step 1: Create new Power Automate Flow

Go to https://make.powerautomate.com/ and click on “Create”, and select “Automated Flow”

Step 2: Enter Flow name and select Dataverse

Give the flow a name, and search for “dataverse” and select “When a row is added, modified or deleted”

Step 3: Configure Trigger that will start up our Flow

On the next screen we will configure the trigger. We will configure the Change Type to “added or modified” to ensure that the trigger only runs when a new lead is added, or when a lead is modified.

Table name: Leads (as we want to target leads in this case)

Scope: Organization (We want this flow to run for the entire dataverse organization, not just our user scope)

Select Columns: We will enter “ownerid” here because we want to make sure that our trigger only runs when the field “ownerid” (which is the lead owner) is added or changed

Step 4: Get Current Lead

First we need to get the record of the lead that had an addition/change to the lead owner. We will add a new action to our flow and search for “dataverse” and select “get a row by ID”

We will select the table name “Leads” and for Row ID we will select “lead ID”

Step 5: Ignore Closed Leads

To make sure we’re not going to process leads that have been closed already, we need to filter out the closed leads with a condition. We can do that by terminating the flow if the “Lead Status” is equal to 0.

 

Step 6: Get Lead Owner

For the leads that are not closed, we continue by getting the lead owner from the relationship between table “leads” and “users”. We can do that by retrieving the Table “Users” and get the row id from the Owner Value from the Leads.

Step 7: Get Lead Owner Email Address

Since we want to send a teams message, we will need to retrieve the primary account UPN for that particular owner. We can do that by creating an action called “Get user profile (V2)”, and search the user based on the primary email address we got from the previous step.

Step 8: Get a Mention token for a user in Teams

Since we want to send a message in a particular channel, and tag the owner in the message, we need to get a “mention token” for this user. We can do this with the task “Get an @mention token for a user” from Teams, and use the user principal name we got from the previous step:

Step 9: Delay task for 1 Minute

In order to make sure that Teams is ready to accept our message with mention token, it is recommended to add a 1 minute delay, to make sure no errors occur:

Step 10: Post a Message in a Chat or Channel

Now we have all the information we need, we can post a message in a Teams Channel. In our case we post it in a group chat, but you can also choose a channel.

For the message, we will include not only the Lead Company Name and Lead Topic, but we also want to include a link to the actual lead in dynamics.

Make sure that you enter the fields using the Code View “</>” option, so your urls will not be truncated or broken. In the Code View option, you can enter HTML code to change the layout of the text. (We use <p> for paragraphs, <br> for lines etc

You can see from above screenshot, we first add the “mention token” and then we also include a link to the URL of the lead in Dynamics.

How to get the Lead URL in Dynamics:

  1. Go to Dynamics 365 – Leads
  2. Click on any Lead
  3. Extract the URL from your browser, and remove the last guid from the url (see orange below)

The URL you should use should looks something like:

https://xxxxxxxxxxxxx.dynamics.com/main.aspx?appid=xxxxxx&pagetype=entityrecord&etn=lead&id=

Now paste that in your Flow and make it a Link using the html <a href=””>  lead </a> code.

When you’re done, your flow should have the following steps:

Now you can test your flow, and (hopefully) it should work. Here is an example of how it looks on our side:

Great Work! Feel free to reach out if you have any issues or questions regarding above flow.

Microsoft Power Automate (earlier known as Microsoft Flow) allows you to automate repetitive manual tasks and paper processes via an easy to use drag-and-drop wizard.

Microsoft Power Automate can create workflows to sync data across apps and software, generate real-time notifications to alert stakeholders, update databases with new information and collect data from Power Apps or other data sources.

In this example we will teach you how to use Power Automate to create recurring tasks in Microsoft Planner.

For this example we imagine that we want to remind our finance department to check and send out a monthly invoice to the customer.

Step 1: Create new Power Automate Flow

Go to https://make.powerautomate.com/ and click on “Create”, and select “Scheduled Cloud Flow”

Step 2: Enter Flow Name and Set Schedule

Give the flow a name, and enter the schedule. In our example we want to have a monthly reminder, so we set the repeat time to every 1 month.

Now we can see the Flow editor screen, with our monthly recurring task as starting point. We click on new step:

Step 3: Create New Task in Planner

We find Planner and select “Create a Task”

After that we select which Planner Plan the task need to be created, and we fill in the information that we want to show in the planner task.

In our example we want to enter some dynamic fields, for the Start Date, Due Date and also to show a dynamic date and time in the Title.

For the Start Date we want today’s date, so we will have to fill in a Dynamic Expression:

Expression:

utcNow()

For the Due Date, we want to set it 15 days from today, hence we fill use the expression adddays() to add 15 days from today (utcnow()):

For the Title we also want to add the Due date, hence we will add the adddays function as well there:

Expression 1:

formatDateTime(adddays(utcnow(),-15),'MM')

Expression 2:

formatDateTime(utcNow(),'yyyy')

Important: For Assigned User Id’s, fill in the email addresses of the users that you want to assign the task to.

Step 4: Update Planner Task Details

Now we have created the main task, we can also update or add more details under the planner task details. For this we add one more flow called “Update task details””.

In this task, we need to refer to our original planner task ID.

 

And after that we can add some more information. In our case we add a link to the billing sheet we want the finance department to use, which is an Excel file. But you Can also add a checklist here.

That’s it! Now our Flow is ready. We can save it, enable it and test it out. If everything runs smooth, your task will now appear in Microsoft Planner every month.