Help centre
العربية Back to sayvara.com

Dynamics 365

Open a Dynamics 365 case for each Sayvara follow-up ticket, on the customer's contact, and resolve or reopen it as the ticket changes.

Updated

What it does

When Sayvara opens a follow-up ticket for a customer, for example after a low score, it opens a case in your Dynamics 365 Customer Service environment:

  • Sayvara looks for the customer's contact by email first, then by phone number. It finds the number in any common written form, such as +966 5…, 05… or 9665….
  • If no contact matches, Sayvara creates one with the customer's name, email and mobile number.
  • The case is opened on that contact, with the ticket reference, the survey name and the customer's comment.
  • The case follows the ticket. When the ticket is resolved or closed, Sayvara resolves the case. When the ticket reopens, Sayvara sets the case active again.

Sayvara never opens two cases for the same ticket, even when it has to try again.

Status

Available to owners and admins on a plan that includes integrations. The Dynamics 365 tile is under Other systems on the Integrations page. If you don't see it, write to support@sayvara.com.

What you need first

  • In Sayvara: the owner or admin role, and a plan that includes integrations.
  • In Microsoft: a System Administrator of the environment for Connect with Microsoft. For your own app registration instead, an administrator who can register an app in Microsoft Entra ID and add an application user in the Power Platform admin center.
  • Your environment host, for example acme.crm4.dynamics.com.
  • In the case table, the default option values: Origin Web, and the resolved status reason Problem Solved. Sayvara uses them for the cases it opens and resolves. With Connect with Microsoft you can choose others.

Connect with Microsoft

This is the quickest way: no app registration and no secret to copy. You need a Microsoft account that is a System Administrator of the Dynamics 365 environment.

  1. Go to Integrations. Under Other systems, on the Dynamics 365 tile, select Set up CRM.
  2. On the Dynamics 365 card, select Connect with Microsoft.
  3. Type the Environment host, for example acme.crm4.dynamics.com. It is the address you see when Dynamics 365 is open.
  4. Select Continue to Microsoft, sign in and approve Sayvara.

Sayvara then sets up its own application user in the environment, with a security role made for it (the window shows its name), and adds the reference column new_sayvararef on Case. Back in Sayvara, the card lists the environment under Approved with Microsoft.

Use this environment

  1. Next to the environment, select Use this environment.
  2. Check the case settings:
    • Origin of the cases Sayvara opens: Phone, Email or Web (the default).
    • Status code of a resolved case: the status reason Sayvara sets when it resolves a case. In the standard set, 5 is Problem Solved.
    • Reference column on Cases: change it only if your administrator made a different column.
    • Language of the text Sayvara writes in Dynamics 365: Arabic or English.
  3. Select Connect. Sayvara checks with Dynamics 365, then shows Dynamics 365 is connected through your environment. The environment shows In use.

To stop using an approval, select Forget next to it. Sayvara's application user stays in Dynamics 365 until your administrator removes it there.

If Microsoft or Dynamics 365 refuses, the card says why, for example that the account is not a System Administrator of the environment, or that the approval was cancelled. Fix it and select Connect with Microsoft again.

You can also connect with your own app registration, as below.

Set it up with your own app registration

1. In Dynamics 365: add the reference column

On the Case table, add a single line of text column, for example new_sayvararef (it starts with your publisher prefix). Add an alternate key on that column. Sayvara writes its ticket ID here, so a retry finds the case instead of opening a second one.

2. In Microsoft Entra ID: register an app

  1. Register a new app (single tenant is enough).
  2. Under Certificates & secrets, create a client secret. Copy its value.
  3. Copy the app's Application (client) ID and the Directory (tenant) ID.

3. In the Power Platform admin center: add an application user

  1. Open your environment and go to Application users.
  2. Add a new application user for the app from step 2.
  3. Give it a security role that can read and create contacts, and read, create, update and resolve cases.

4. In Sayvara: connect

  1. Go to Integrations. Under Other systems, on the Dynamics 365 tile, select Set up CRM.
  2. On the Dynamics 365 card, select Connect.
  3. Fill in the form:
    • Environment host: for example acme.crm4.dynamics.com.
    • Directory (tenant) ID.
    • Client ID: the application (client) ID.
    • Client secret: it is stored safely and never shown again.
    • Reference field: the column from step 1, for example new_sayvararef.
    • Language of the text Sayvara writes into the CRM: Arabic or English.
  4. Select Connect. Sayvara checks the values with Dynamics 365 before it saves anything. The card then shows Connected.

5. Optional: field mapping

You can send more values into your own case columns. On the Dynamics 365 card, select Field mapping. For each value, type the logical name of a custom column on the case table (it starts with your publisher prefix, such as new_), or leave it empty to skip it:

  • Score, Survey name, Channel, Branch, Customer comment, Link to the ticket.

Select Save mapping. Each column can take one value only.

6. Optional: map inbound fields and test

To bring Dynamics 365 contacts into Sayvara, tell Sayvara which Dynamics 365 contact column fills which Sayvara field.

  1. On the Dynamics 365 card, select Inbound mapping.
  2. Under Contact fields, select Add a contact field. Choose the Sayvara field, for example Name, Email, Phone, Language, City or Branch, and type the CRM field (its API name in Dynamics 365).
  3. Add more rows as needed. Each Sayvara field can be filled once.
  4. For a field with fixed values, such as Language, add a Value list: each CRM value and the Sayvara value it becomes. A CRM value that is not in the list is used as it is when it matches.
  5. Select Save mapping. You see Inbound mapping saved.

The window also has Ticket fields (read from the Dynamics 365 case), such as Priority and Root cause, and Response values: named values kept with the customer's responses, for filters and reports.

Once contact fields are mapped, Sayvara keeps importing Dynamics 365 contacts that change, matched by mobile number, else email. An import never gives consent and never clears an opt-out.

Test the mapping first

In the same window, in the test section with the Run test button:

  1. Choose the Records per type, from 1 to 10.
  2. Select Run test.

Sayvara reads the newest records from Dynamics 365 and shows, for each Record, the Sayvara values it would make and what is Left out, with the reason, for example not a valid email or no branch with this name. Nothing is stored.

Data shared

Direction What
Sayvara to Dynamics 365 A new contact, only when none matches: name, email and mobile number
Sayvara to Dynamics 365 A new case: title, description (the customer's comment and the ticket reference), origin Web, priority (High, Normal or Low, from the ticket), the contact, and your mapped columns
Sayvara to Dynamics 365 Case status: resolved as Problem Solved when the ticket is resolved or closed, active again when it reopens
Dynamics 365 to Sayvara Contacts, with the fields you map in Inbound mapping. Without a map, Sayvara only reads contacts to find the customer, and the status of its own cases

The case title reads, for example, "Customer follow-up FU-1042: Branch visit survey". It and the resolution text are written in the language you chose.

What it does not do

  • Changes you make to the case in Dynamics 365 do not change the ticket in Sayvara.
  • Contacts come in from Dynamics 365 only for the fields you map in Inbound mapping.
  • Tickets opened before you connected, or more than 30 days ago, do not get a case.
  • A ticket whose customer has no email or phone number does not get a case.
  • One Dynamics 365 environment per Sayvara organisation.

See the case on a ticket and retry

Open a ticket in Sayvara. The panel CRM case shows the case number, its status in Sayvara and its status in Dynamics 365, as last read. Sayvara reads the status from Dynamics 365 every few minutes, so it may be a little behind.

If Dynamics 365 refused the case, the panel says Dynamics 365 did not accept this case. Owners and admins see Try again:

  1. Fix the cause first, for example the connection or a field in Dynamics 365.
  2. Select Try again. You see Sayvara will send this case to Dynamics 365 again in a moment.

If the Dynamics 365 connection is paused, Sayvara says so. Select Resume on the Dynamics 365 card, then try again.

Test, pause or disconnect

On the Dynamics 365 card in Integrations > Set up CRM:

  • Test now checks the sign-in and asks for a case and a contact. The card shows the result of the last test.
  • Pause stops new cases and status changes. Resume starts them again.
  • Disconnect stops Sayvara writing to Dynamics 365 and removes the secret. Cases already there stay. To remove Sayvara's access fully, also remove the application user and the app registration.

If Dynamics 365 cannot be reached, Sayvara tries again with a growing wait, up to 10 times.

Troubleshooting

Message What to do
The CRM refused the client ID or secret. Check the IDs and the secret, and that the application user exists in this environment.
The CRM could not be reached. Try again in a minute. Check the environment host. Try again in a few minutes.
This CRM is already connected. Your organisation already has a Dynamics 365 connection. Disconnect it first to connect another environment.
Use custom fields only (Salesforce: ending in __c; Dynamics 365: with your publisher prefix). Use the logical name of a custom column, with your publisher prefix.
Check the values: a host, ID or field is not in the expected form. The host looks like acme.crm4.dynamics.com, and both IDs are GUIDs.
Your plan does not include integrations. Ask us about a plan with integrations.
Only owners and admins can connect a CRM. Ask an owner or admin.