Aller à la navigation Aller au contenu

Tendances techno 15 min de lecture

Dynamics 365 : Comment créer un workflow ? (automatisation)

Un workflow est en fait un processus automatisé créé pour effectuer une tâche que vous aimeriez que Dynamics 365 effectue pour vous. Vous n’avez ainsi pas besoin de gérer la tâche à chaque fois que vous vouliez qu’elle s’effectue.

Il est important de savoir que chaque processus de workflow est associé à une seule entité. Une entité est un élément qui ne dépend pas d’un autre pour fonctionner, comme un formulaire, un compte, un contact, un prospect ou une opportunité. Au moment de configurer votre premier flux de travail, vous devez considérer 4 facteurs importants :

  • Déterminer les déclencheurs qui les actionnent
  • Choisir le mode d’exécution : en temps réel ou en arrière-plan
  • Définir les actions à effectuer
  • Déterminer les critères et les exclusions d’automatisation

Où trouve-t-on l’éditeur de Workflow dans Dynamics 365?

Vous devez cliquer sur Paramètres avancés

Cliquer sur la flèche pointant vers le bas à droite de Paramètres et cliquer sur Processus

Cliquer sur le bouton Nouveau afin d'activer l'éditeur de workflow (automatisation)

Une autre façon d'accéder à l'éditeur de Workflow dans Dynamics 365

Vous pouvez également trouver les workflows de votre organisation en sélectionnant Processus dans Solution par défaut. Vous devez ensuite appliquer un filtre sur les processus affichés avec la catégorie Workflow (flux de travail). Vous verrez à cet endroit tous les flux de travail qui sont programmés dans votre organisation.

Les développeurs peuvent quant à eux créer des workflows à l'aide des informations du Guide du développeur pour les applications Dynamics 365 for Customer Engagement, et les solutions que vous achetez peuvent comprendre des workflows pré-paramétrés que vous pouvez ensuite modifier selon les besoins de vos opérations.

Propriétés des workflows dans Dynamics 365

Nom du processusLe nom du processus de workflow ne doit pas nécessairement être unique, mais si vous prévoyez créer et gérer un grand nombre de flux de travail, vous voudrez peut-être utiliser une nomenclature fixe pour mieux différencier vos processus les uns des autres. Vous pouvez par exemple appliquer des préfixes au nom du workflow, qui peuvent décrire la fonctionnalité de workflow ou le département auquel il est associé dans votre entreprise. Cela vous aide à regrouper les éléments similaires dans la liste des workflows pour avoir une meilleure vue d’ensemble.

EntitéChaque processus de flux de travail doit correspondre à une seule entité. Vous ne pouvez pas modifier l'entité une fois que le processus de workflow est créé.

CatégorieCette propriété établit qu'il s'agit d'un processus de workflow.

Exécuter ce workflow en arrière-plan (recommandé)Cette option s'affiche quand vous sélectionnez le workflow comme catégorie. Ce paramètre détermine si le workflow est un flux de travail qui sera exécuté en temps réel ou en arrière-plan. Les workflows en temps réel s'exécutent immédiatement (mode synchrone) et les workflows d'arrière-plan s'exécutent de façon asynchrone. Les options de configuration qui se présenteront ensuite dépendent du choix que vous faites pour ce paramètre.

Les workflows d'arrière-plan vous permettent de paramétrer des conditions d'attente, qui feront en sorte que le flux de travail prévoie un délai avant d’effectuer le traitement. Ces paramètres ne sont pas disponibles pour les workflows en temps réel. Tant que vous n'utilisez pas ces conditions d'attente, vous pouvez convertir les workflows d'arrière-plan en workflows en temps réel et inversement. Pour plus d'informations sur les conditions d'attente (voir Définition de conditions pour les actions de workflow).

Vous pouvez également utiliser le Type pour décider de créer un workflow à partir de zéro ou à partir d'un modèle. Lorsque vous sélectionnez Nouveau processus à partir d'un modèle existant (sélection à partir d'une liste), vous pouvez choisir les processus de workflow disponibles qui ont été précédemment enregistrés en tant que modèles dans votre entreprise.

Après avoir créé un workflow, ou après en avoir modifié un, vous disposez des propriétés supplémentaires suivantes :

Activer en tant queVous pouvez choisir Modèle de processus pour créer un point de départ plus avancé pour d'autres modèles. Si vous sélectionnez cette option après avoir activé le flux de travail, il ne sera pas effectif, mais pourra être sélectionné dans la boîte de dialogue Créer un processus si vous sélectionnez Type : Nouveau processus à partir d'un modèle existant (sélection à partir d'une liste).

Les modèles de processus sont utiles si vous avez plusieurs processus de flux de travail similaires et que vous souhaitez les définir sans devoir dupliquer la même logique à chaque fois que vous les paramétrez.

Disponible pour exécutionCette section contient les options expliquant comment le workflow peut être exécuté.

Exécuter ce workflow en arrière-plan (recommandé)Cette case à cocher reflète l'option sélectionnée lors de la création du workflow. Cette option est désactivée par défaut, mais vous pouvez la modifier dans le menu Actions en choisissant Convertir en workflow en temps réel ou Convertir en workflow d'arrière-plan.

En tant que processus à la demandeSélectionnez cette option si vous souhaitez permettre aux utilisateurs d'exécuter ce workflow manuellement. Les processus à la demande sont disponibles sous la section Exécuter le workflow.

En tant que processus enfantSélectionnez cette option si vous souhaitez autoriser le workflow à être exécuté à partir d'un autre workflow.

Rétention des tâches de workflowCette section contient une option pour supprimer un workflow à son exécution.

Supprimer automatiquement les tâches de workflow terminées (pour libérer de l'espace disque)Sélectionnez cette option si vous souhaitez qu'une tâche de workflow terminée soit automatiquement supprimée pour libérer de l’espace disque.

RemarqueLes tâches de workflow ne sont pas supprimées automatiquement après leur exécution, mais peu après, via un traitement par lot de la suppression des tâches.

ÉtenduePour les entités appartenant à l'utilisateur, les options sont Organisation, Division mère : sous-divisions, Division, ou Utilisateur. Pour les entités détenues par l'organisation, la seule option est Organisation.

Si l'étendue est Organisation, la logique de workflow peut être appliquée à tous les enregistrements de l'organisation. Sinon, le workflow peut être appliqué uniquement à un sous-ensemble d'enregistrements de l'étendue.

RemarqueLa valeur par défaut de l'étendue est Utilisateur. Veillez à vérifier la valeur de l'étendue avant d'activer le workflow.

Démarrer quandUtilisez les options de cette section pour spécifier quand un workflow doit démarrer automatiquement. Vous pouvez configurer l'exécution d'un workflow en temps réel avant certains événements liés à votre site Web ou autre plateforme d’informations. Pour plus d'informations : Utilisation de workflows en temps réel. Ces options sont les suivantes :

  • L'enregistrement est créé
  • Statut de l'enregistrement modifié
  • L'enregistrement est attribué
  • Champs d'enregistrement modifiés
  • L'enregistrement est supprimé

RemarqueSouvenez-vous que les actions et les conditions que vous définissez pour le workflow ne savent pas quand le workflow est exécuté. Par exemple, si vous définissez un workflow pour mettre à jour l'enregistrement, cette action ne peut pas être effectuée par un workflow en temps réel avant que l'enregistrement ne soit créé. Un enregistrement qui n'existe pas ne peut pas être mis à jour. Si vous configurez un workflow pour effectuer une action qui ne peut pas être effectuée, celle-ci échoue et le workflow entier échoue. Assurez-vous donc de bien définir votre flux de travail afin qu’il soit exécuté au bon moment dans votre processus.

Exécuter en tant queCette option est la seule disponible si vous avez désactivé l'option Exécuter ce workflow en arrière-plan (recommandé) lorsque vous avez créé un workflow ou si vous convertissez ultérieurement un workflow d'arrière-plan en un workflow en temps réel.

Contexte de sécurité des processus de workflow dans Dynamics 365

Lorsqu'un workflow d'arrière-plan est configuré en tant que processus à la demande et est lancé par un utilisateur à l'aide de la commande Exécuter le workflow, les actions que le workflow peut effectuer sont limitées à celles que l'utilisateur peut effectuer selon les droits et les niveaux d'accès définis pour son compte d'utilisateur.

Lorsqu'un workflow d'arrière-plan est déclenché par un événement, le workflow fonctionne dans le contexte de la personne qui en est le propriétaire, généralement la personne qui a créé le workflow. Le propriétaire doit donc détenir les droits pour effectuer les actions demandées au flux de travail.

Pour les workflows en temps réel, vous avez l'option Exécuter en tant que et vous pouvez décider si le workflow doit appliquer le contexte de sécurité du propriétaire du workflow ou de l'utilisateur qui a modifié l'enregistrement la dernière fois. Si le workflow comporte des actions que certains utilisateurs ne peuvent pas effectuer selon les contraintes de sécurité, vous devez choisir l'exécution du workflow en tant que propriétaire du workflow.

Activer un workflow dans Dynamics 365

Les workflows peuvent être modifiés uniquement lorsqu'ils ne sont pas actifs. Avant qu'un workflow puisse être utilisé manuellement ou déclenchés selon des événements, il doit être activé. Avant qu'un workflow puisse être activé, il doit contenir au moins une étape. Pour plus d'informations sur la configuration des étapes (voir Configuration des processus de workflow )

Un workflow peut être activé ou désactivé uniquement par le propriétaire du workflow ou par une personne disposant du privilège Agir au nom d'un autre utilisateur, comme l'administrateur système. Autrement, un utilisateur malveillant pourrait modifier le workflow d'une autre personne à son insu. Vous pouvez réattribuer un workflow que vous possédez en modifiant le propriétaire. Ce champ figure sous l'onglet Administration. Si vous n'êtes pas l'administrateur système et que vous devez modifier un workflow qui appartient à un autre utilisateur, vous devez lui demander de le désactiver et de vous l'attribuer. Après la modification du workflow, vous pouvez le lui réattribuer afin qu'il puisse l'activer.

Les workflows en temps réel exigent que l'utilisateur dispose du privilège Activer les processus en temps réel. Comme les workflows en temps réel présentent un plus grand risque d'affecter les performances système, seuls les utilisateurs qui peuvent évaluer le risque potentiel doivent avoir ce privilège.

Les workflows sont enregistrés lorsqu'ils sont activés, il n'est donc pas nécessaire de le faire avant de les activer.

Source : https://docs.microsoft.com/fr-...

Choisir nos experts de chez Gestisoft pour votre implantation CRM

Microsoft Flow est inclus avec un abonnement de Microsoft Office 365. Très simple à configurer, il permet de réaliser des tâches simples sans avoir à naviguer d’une application à l’autre. Flow va tout gérer pour vous. Nos experts en CRM et ERP peuvent explorer avec vous toutes les solutions de personnalisation qui est applicable à votre réalité professionnelle. Contactez-les pour voir comment un WorkFlow peut vous aider dans votre travail.

For starters, what is a workflow ? A workflow is an automated process that gets Dynamics 365 to perform a specific task for you. It allows you to avoid the hassle of having to perform this task manually every time.

You should keep in mind that each workflow process is associated with a single entity. An entity is defined by its ability to function independently from other factors like forms, accounts, contacts, leads, or opportunities. Consider 4 important factors when setting up your first workflow:

  • Define the activation triggers
  • Select the mode of execution, whether in real time or in the background
  • Determine the actions to perform
  • Precise the automation criteria and any exclusions

Types of Workflows in Dynamics 365

Workflows in Microsoft Dynamics 365 are a powerful tool to help automate business processes, streamline operations, and reduce manual effort. By utilizing workflows in Dynamics 365, businesses can ensure consistency, increase efficiency, and improve the quality of their service. 

Microsoft Dynamics 365 offers several types of workflows that cater to different business scenarios, allowing users to customize processes based on their needs. Let's take a look at some of the types of workflows in Dynamics 365:

1. Background Workflows in Dynamics 365 (Asynchronous)

Background workflows in Dynamics 365 are processes that run behind the scenes and do not require immediate user interaction. They are triggered based on specific conditions and perform actions after the workflow criteria are met. Since they are asynchronous, background workflows allow users to continue working in the system while the workflow completes its tasks in the background.

2. Real-Time Workflows in Dynamics 365 (Synchronous)

Unlike background workflows, real-time workflows execute immediately after an event occurs in the system. These workflows run synchronously, meaning they hold up the system until the Dynamics 365 workflow completes, making them suitable for tasks that require immediate action or validation.

3. On-Demand Workflows in Dynamics 365

On-demand Dynamics 365 workflows are manually triggered by users within the Dynamics 365 interface. Unlike other workflows that are automatically initiated based on system events, on-demand workflows allow users to initiate the process at the time of their choosing. This is especially useful when certain actions are needed based on the user’s discretion or when immediate automation isn’t necessary.

4. Child Workflows in Dynamics 365

Child workflows in Dynamics 365bare designed to run as sub-processes of a parent workflow. These workflows can be reusable across different parent workflows, which reduces the need for duplicating logic. Child workflows can be either background or real-time, depending on how the parent workflow is set up.

5. Business Process Flows in Dynamics 365 (BPFs)

Business Process Flows (BPFs) guide users through a defined set of steps to complete a task or process, ensuring consistency and adherence to business rules. Unlike traditional Dynamics 365 workflows, BPFs are visual tools that display a process across stages, helping users understand what steps are required to complete a particular business function.

6. Automated Flows in Dynamics 365 (Power Automate Integration)

With the integration of Power Automate, Microsoft Dynamics 365 users can create automated flows that connect to external systems and applications. This expands the functionality of Dynamics 365 workflows beyond the core CRM system and allows for cross-application automation.

Where is the Workflow editor located in Dynamics 365?

First, click on Advanced settings

Then, click on the downwards arrow to the right of Settings, and select Processes

Click New to access the workflow editor

Another way to access the Workflow editor in Dynamics 365

Alternatively, you can locate your organization’s workflows by selecting Processes in Default Solution. Then, you must apply a Workflow filter on the displayed processes. This way, you will be able to access all the workflows that are active in your organization.

Developers can design their own workflows following the Developer Guide for Dynamics 365 Customer Engagement. The solution you purchase can also include pre-configured workflows that can be modified to best suit the needs of your business.

Looking to implement Dynamics 365 solution for your company?

Check out our Free e-book on how to successfully implement a Dynamics 365 solution that works for you.

Téléchargez notre guide

Workflow properties in Dynamics 365

Process nameThe workflow process name doesn’t have to be unique, but you might want to decide upon fixed terminology to help distinguish between your processes if you plan to create and manage many workflows. For instance, you can differentiate between workflow names by using prefixes in order to describe their functionality or the specific department in your company that deals with this type of workflow. This will help you group similar items together, allowing for a better overview of your workflow list.

EntityYou should have a single entity corresponding to each workflow process. Once the workflow process has been created, you will no longer be able to edit the entity.

CategoryThis property defines that the item in question is a workflow process.

Run this Workflow in the background (recommended)This option appears when you select the workflow as a category. It will determine whether the workflow will run in real time or in background mode. Real-time workflows will be launched immediately (synchronous), while background workflows are asynchronous. The following configuration options will depend on the setting choice you have made.

In background workflows, you can set the workflow up wait conditions that will schedule a specific processing delay. Real-time workflows do not allow for this configuration. If you’re not using wait conditions, you can freely convert between background workflows and real-time workflows at will. To learn more about wait conditions, see Setting Conditions for Workflow Actions.

Additionally, you can also use Type to choose whether you want to create a workflow from scratch or from a template. If you select New Process from an existing template (select from list), you can choose from available workflow processes that were saved as templates in your organization.

After creating or modifying a workflow you will have access to the following additional properties:

Activate asYou can create an advanced starting point for other models by selecting Process template. If you select this option after activating the workflow, it will not be applied but can be selected in the Create Process dialog box when you choose Type: New process from an existing template (selecting from list).

If you have several similar workflow processes that you would like to define without duplicating the same logic, Process templates can come in handy.

Available to RunThis section contains options detailing how the workflow can be executed.

Run this Workflow in the background (recommended)This check box reflects the option that was selected when you created the workflow. While disabled by default, you can activate this option in the Actions menu by choosing Convert to a real-time workflow or Convert to a background workflow.

As an on-demand processSelecting this option will allow users to launch this workflow manually. You can find on-demand processes under the flow’s Run Workflow section.

As a child processSelect this option if you want to let users run this workflow manually. On-demand processes are available under the Execute Workflow section.

Workflow Job RetentionThis section allows you to delete a workflow following the completion of its execution.

Automatically delete completed workflow jobs (to save disk space)Select this option if you want a completed workflow task to be automatically deleted to free up disk space.

NoteWorkflow jobs deleted through a batch process soon after completion, but not right away.

ScopeUser-owned entities have the following options: Organization, Parent: Child Business Units, Business Unit and User. For entities owned by the organization, Organization is the only option.

If scope is Organization, workflow logic can be applied to all records within the organization. Otherwise, the workflow can only be applied to a subset of records within the scope.

NoteThe scope’s default value is User. Take care to verify that the scope has an appropriate value before activating the workflow.

Start WhenUse this section’s options to specify when a workflow must launch automatically. You can configure the execution of a real-time workflow before certain events. It is a very powerful capability because it allows the workflow to stop an action before it occurs. For more information: Use of real-time workflows. These options are:

  • Record is created
  • Record status changes
  • Record is assigned
  • Record fields change
  • Record is deleted

NoteRemember that any action and condition you define for the workflow are not aware when the workflow will execute. For instance, if you define a workflow to update the record, that action cannot be executed by a real-time workflow until the record is created. A record that does not exist cannot be updated. If you configure a workflow to perform an action that cannot be performed, the action fails and the entire workflow fails as well. Make sure to define your workflow well so that it executes at the correct time in your process.

Execute AsThis is the only available option if you unchecked Run this workflow in the background (recommended) when you created a workflow, or if you later convert a background workflow to a real-time workflow.

Security context of workflow processes in Dynamics 365

When a background workflow is configured as an on-demand process and is started by a user using the Run Workflow command, the actions that the workflow can perform are limited to those the user could perform based on the privileges and access levels defined by the security role(s) set for their user account.

When a background workflow starts based on an event the workflow operates in the context of the person who owns it, usually the person who created the workflow.

For real-time workflows, you have the Execute As option, and you can choose whether the workflow should apply the security context of the owner of the workflow or the user who made changes to the record. If your workflow includes actions which all users would not be able to perform based on security constraints, you should choose to have the workflow run as the owner of the workflow.

Activate a workflow

Workflows can only be edited while they are deactivated. Before a workflow can be used manually or be applied due to events it has to be activated. Before a workflow can be activated it must contain at least one step. For information on configuring steps, see Configuring workflow processes.

A workflow can only be activated or deactivated by the workflow owner or by someone with the Act on Behalf of Another User privilege such as the system administrator. The reason for this is that a malicious user could modify someone’s workflow without them being aware of the change. You can reassign a workflow you own by changing the owner. This field is on the Administration tab. If you are not the system administrator and you need to edit a workflow that is owned by another user, you need them to deactivate it and assign it to you. After you finish editing the workflow, you can assign it back to them so they can activate it.

Real-time workflows require that the user have the Activate Real-time Processes privilege. Because real-time workflows have a greater risk of affecting system performance, only people who can evaluate the potential risk should be given this privilege.

Workflows are saved when they are activated, so it is not necessary to save them before activating them.

Allow Gestisoft experts to implement your CRM

Your Microsoft Office 365 subscription also includes Microsoft Flow. With an easy set up, it lets you perform simple tasks without having to switch between applications. Flow will handle everything for you. Whatever customization solution your professional reality may require, our CRM and ERP specialists will be happy to explore them with you. Contact our experts and learn how Workflows can help your work processes.

Need Automation Assistance?

Unlock Dynamics 365 workflows and streamline your operations. Let Gestisoft guide you to seamless automation.

Contact us today

Vous avez aimé ce que vous venez de lire? Partagez-le!

11 mars 2021 par Frédéric Charest Vice-Président Marketing

Spécialiste du marketing de croissance axé sur les données et passionné par le référencement, j'obtiens des résultats grâce à l'analyse et à l'optimisation.