Kaisa integrates easily with MS Dynamics 365 so you can receive data seamlessly. For the integration to work, you will need to install a Kaisa-managed package. Please follow the below guide for easy installation.
-
First, create an app registration in Azure Active Directory
Go to https://portal.azure.com/ and choose Azure Active Directory. Click on App Registration and then on New Registration.
Chose a name for the new App registration, select Accounts in any organizational directory (Any Azure AD directory - Multitenant), and input your Dynamics 365 domain URL into redirect URL as Public client/native (mobile & desktop):
After the registration app is created, you can open the Overview and note somewhere the Application (client) ID and Directory (tenant) ID. Kaisa will use this data to retrieve an authentication token before creating an object in MS Dynamics.
The next step is to add permissions to the application registration under API permissions. The permissions (delegated) to include are: Data Export Service for Microsoft Dynamics 365 (user_impersonation), Dynamics CRM (user_impersonation), and Microsoft Graph (user_impersonation). This might vary depending on how your MS Dynamics is configured and what modules you are using.
There is a possibility you will need to Grant admin consent for this app if the integration encounters any authorization issues or an admin will have to approve this app.
Finally, check the app Manifest to make sure that the allowPublicClient, oauth2AllowIdTokenImplicitFlow, and oauth2AllowImplicitFlow are set to true:
-
Install the managed package
Kaisa will provide you with a managed package installation file. Go to the targeted Dynamics 365 environment and choose Advanced Settings. Click on Solutions:
Chose the file provided by Kaisa and proceed with the installation of the managed package:
1.
2.
3.
4.
5.
The next step is to change the layout of the dashboard to show the new custom objects to finish up the setup. Go to Settings -> Customizations and use Customize the System.
Find the following 4 Kaisa entities:
- Kaisa Object
- Kaisa Log
- Kaisa Credentials
- Recurring Process
For each of the entities under Areas that display this entity choose Sales or similar where you want to show the objects. Save and move on to the next entity. Once finished publish the customisations.
You should now have the newly created entities available in the Dashboard under Extensions and we can move on with setting the integration:
-
Connect MS Dynamics to Kaisa
To be able to connect MS Dynamics to Kaisa and send the information stored in the fields Order value, V1, V2 and V3 back, the Kaisa Credentials custom setting needs to be created.
Under Extensions, choose FreespeeCredentials and create a new set with the following information:
- Name: API Credentials (or any other name)
- Credentials Id: 1 (or any other unique credential id)
- Freespee API URL: https://api.analytics.freespee.com/2.4.9/
- Freespee Method: customer_call_orders
- Freespee Username: <Your Freespee API tag>
- Freespee Password: <Your Freespee API password>
Example of FreespeeCredentials configuration setting:
Click Save / Save & Close.
You will now be able to send the Order value and V1, V2, and V3 data points to Kaisa.
-
Set up logging and retries to Kaisa
To make sure that any data that is sent to Kaisa doesn’t get lost, with the installation of the managed package you will also install a custom object CO_FreespeeLogs. In this object, the feedback from sending information to Kaisa is going to be stored.
In case of any problems in the MS Dynamics -> Kaisa connection, logs of the error will be stored in this object and retried every hour. To achieve this you need to create a new Recurring Process.
Under Extensions, choose Recurring Processes and click New.
Set up the fields with the following information:
- Name: Workflow to resend data to Kaisa (or similar)
- Workflow: choose Resent Kaisa Objects with 400 log status code from the dropdown menu
- Entity type: click on + New Kaisa Log and create a new entity with the information below (click on Save and continue)
- Frequency: Hourly
New Kaisa Log entity information:
- Modification date: set current date / leave blank
- Description Callout: OK
- StatusCode: 200
- Dont Send: Sí
- Workflow log: From the drop-down list pick the workflow you created in this case: Workflow to resend data to Kaisa
- Name: Default KaisaLog for related workflow (or similar)
Click on Save / Save and close.
Example of the entity:
Pick the entity type on the Recurring Process screen that you just created and set the Last run date to the current date and time to trigger the process.
Example of the recurring process:
With this, all the solution settings are configured in MS Dynamics. You can see all the workflows in the Settings -> Processes (or System Jobs):
If necessary, you can also remove any extension that you will not actively use from the dashboard reverting the changes described on page 7.
-
Create an integration user and prepare the integration details for Kaisa
The details Kaisa will need to set up the integration and create the custom objects are:
- Your org domain
- Your integration username
- Your integration user password
- Application (client) ID
- Directory (tenant) ID
If you don’t have one already, we suggest creating a dedicated user for this integration so all objects created by this integration will be from that one user.
That’s it! Once Kaisa confirms that the integration is set up you should start seeing the custom objects in your MS Dynamics dashboard.
Comments
0 comments
Please sign in to leave a comment.