# Classic Workflow

To enable automatic assignments on the update, follow the steps given below:

* Create a workflow that will trigger on change of the field (e.g. Status Reason).

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK5mo71ZYAq8WCs5_W%2FClassic%20WF_1.jpg?alt=media&#x26;token=dad8fddb-356d-414d-9195-4cfe5295b1c0" alt="Classic Workflow"><figcaption></figcaption></figure>

* If required add condition to check and run assignment only if your criteria meets. For the demo purposed, we had used condition to check if Status Reason is Ready.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK5seh1UdFITC3YRHk%2FClassic%20WF_2.png?alt=media&#x26;token=41d1b491-8a8c-4084-b5c0-a4fbc4e20f17" alt="Classic Workflow"><figcaption></figcaption></figure>

* **Get the GUID of the record:** Add workflow assembly to get the GUID of the current record. Download and install [Dynamics 365 Workflow Tools Solution 1.0.60.1](https://github.com/demianrasko/Dynamics-365-Workflow-Tools/releases/tag/1.0.60.0) managed solution in your environment. This managed solution provides assembly called **‘msdyncrmWorkflowTools: Get Record ID’** to get the GUID of the record.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK65E6KyRy_gPAjiWg%2FClassic%20WF_3.jpg?alt=media&#x26;token=6648e8fe-f5cd-4ea2-afa9-0d97fe9e72f9" alt="Classic Workflow"><figcaption></figcaption></figure>

* You would need to pass the Record URL from current lead to Record URL parameter.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK6L9_YMnwP6U13Vax%2FClassic%20WF_4.png?alt=media&#x26;token=49ef003c-a14c-4d8a-a2c8-24f3787fcb94" alt="Classic Workflow"><figcaption></figcaption></figure>

* This step will return the GUID of the current lead record.
* Call **‘Inogic.AddItemsToQueue’** action of Inogic --> Add **‘Perform Action’** step --> Select **‘Inogic.AddItemsToQueue’** action. This action is already available in the Lead Assignment and Distribution Automation solution.

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK6QkFk155a38lNubO%2FClassic%20WF_5.jpg?alt=media&#x26;token=478119bf-eb69-4594-b05b-5e8a5aea3d6a" alt="Classic Workflow"><figcaption></figcaption></figure>

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK6lt7QLLNWGlbic9m%2FClassic%20WF_6.jpg?alt=media&#x26;token=0e30ec22-3953-4332-9665-5705a8d942c4" alt="Classic Workflow"><figcaption></figcaption></figure>

* Pass **PrimaryEntityName** and **PriamryEntityID** as Logical name of the entity e.g. lead, incident etc. and **‘GUID of the record return by the msdyncrmworkflow tools step’** respectively. This action will perform automatic assignment based on the Assignment Rules.&#x20;

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK6vU7tx3Q3Z2LsLQs%2FClassic%20WF_7.jpg?alt=media&#x26;token=346954c2-dda6-4967-ad71-1d70b28fbc3e" alt="Classic Workflow"><figcaption></figcaption></figure>

* **Save and Activate** the workflow. The final workflow will look as below:

<figure><img src="https://272130504-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0QoyqUVI8_HaZ9FOSL%2F-MZK1Y2d91mhb_AQzRzf%2F-MZK7-fhSFIwP4NSo9JB%2FClassic%20WF_8.png?alt=media&#x26;token=32e0b59f-3da9-4c61-9c93-8ac9e87a2934" alt="Classic Workflow"><figcaption></figcaption></figure>

{% hint style="success" %}
For further queries, reach out to us at [crm@inogic.com](mailto:crm@inogic.com)
{% endhint %}
