Integrating Microsoft Dynamics NAV with Solve 360 using REST Connector

Integrating-Microsoft-Dynamics-NAV-with-Solve-360-using-REST-Connector-

Table Of Contents

  • Introduction
  • Background
  • Prerequisites
  • Business scenario
  • The prerequisites
  • Steps
    • Technology app Creation
    • Schema Addition
    • Endpoint Configuration & Action and Error filter Configuration
      • Endpoint Configuration
      • Action Filter Configuration
      • Error Filter Configuration
    • Connection Creation
    • Workflow Creation
    • Credential validation
    • Connection Deployment and Environment
  • Setup
  • Workflow Execution
  • Conclusion

Introduction:

Microsoft Dynamics NAV is an ERP platform that caters to the business requirement for almost any size of business that is from mid-level to large levels. Here is an Infographic on the evolution of Microsoft Dynamics Nav from PC-Plus!

But at the same time, you have a CRM application that is not as famous as Microsoft Dynamics NAV but it satisfies your requirement. The main objective of any business cycle is to reach run these applications simultaneously.

Business applications need to be integrated to fulfill this requirement. Though there are many platforms that provide readymade templates for Integrating Microsoft Dynamics NAV but often the application on the other side is not the one you are looking for. Apps that are less famous use REST protocol for creating their API Services.

In this article, I will discuss how can you integrate Microsoft Dynamics NAV with your other REST application on the APPSeCONNECT platform.

Connect all your business applications under one single platform to automate the business process and increase your productivity and efficiency!Integrate-Business-Apps-through-APPSeCONNECT

Background:

As discussed earlier, integration of applications is a requirement for any business that wants its cycle to run on real-time data and thus it helps you to connect various applications so that your hired IT Team does not have to switch between applications to get the desired records.  It also ensures that the employees are dedicated to raising your business to new heights rather than wasting human labor in maintaining the applications and updating them according to the requirement.

Prerequisites:

Here is the list of prerequisites you need to have before configuring your NAV with your unique RESTful application.

  • An active account in APPSeCONNECT Portal.
  • Proper credential details of your NAV or any other ERP.
  • Credentials of the other app which you need to integrate with NAV.
  • The proper API documentation of the other application.
  • POSTMAN application to find out HTTP protocols, authentication, endpoint, URL, request headers, parameters.

Business scenario:

In this article, I am going to discuss the integration of Microsoft Dynamics NAV with a CRM application ‘Solve 360 CRM’. This article will guide you to integrate these apps right from the scratch. In the market, there is almost no ready template for NAV-Solve 360 CRM.

Though there are many organizations that offer personalized integration solutions, this only results in higher costs. But APPSeCONNECT provides you to integrate any RESTful app with Microsoft Dynamics NAV. Solve 360 CRM is a RESTful application.

Solve CRM has mainly two modules: Company & Contact. In this article, the Customers from NAV will get synced as Company in Solve CRM and the Contacts from Solve CRM will get synced as Contact Person in NAV.

The following will be the field mapping for Contact.

 

Fields in Solve CRM (Source App) Fields in Microsoft Dynamics NAV (Destination App)
name Name
businessemail Email
cellularphone Phone No

 

The following will be the field mapping for Company.

 

Fields in Microsoft Dynamics NAV (Source App) Fields in Solve CRM (Destination App)
Name name
Phone_No businessphonedirect
Email businessemail

Let’s Get Started:

Below are the steps in brief, which we need to follow to integrate Solve CRM (personal app) with Microsoft Dynamics NAV without using any predefined template and fully customize it according to your own requirements.

STEP 1 Technology app Creation
STEP 2 Schema Addition
STEP 3 Endpoint & Action and Error filterConfiguration
STEP 4 Connection creation
STEP 5 Workflow Creation.
STEP 6 Credential validation.
STEP 7 Connection Deployment and Environment Setup.
STEP 8 Workflow Execution.

 

Before you go through the steps below in detail, the prerequisites must be fulfilled.

Integrate-Business-Apps-through-APPSeCONNECT

The prerequisites

Generally, the information written under this headline is easily gathered from the API documentation of the GENERIC APP you are using which is ‘Solve 360 CRM’ in this case. The points which should be noted from the API docs of the external REST application is:

Authentication:

Authentication type: Basic

Username: Registered mail id of the Solve CRM application.

Password: API key of the Solve CRM application. [The steps to fetch the API key is well discussed in the API documentation site of Solve 360 CRM].

[Authentication type can be Oauth2.0, in that case, you need to note about Client id, Client Secret, Auth token URL, Access Token URL, Call back URL, Scope and so on. As this is required for generating access token and refresh token.]

 

Content-Type: Any REST application support XML or JSON or both.

In this case for Solve 360 CRM, XML is the content type.

 

Request URL Identification: Always try to fetch and post data from the generic application using POSTMAN.

Authentication: Basic. The Username and password are provided.

The HTTP request: GET

The web API URLs:

https://secure.solve360.com/contacts ——– (1)

https://secure.solve360.com/companies——-(2)

 

The expected result:

  1. Will fetch all the list of Contacts present in my Application irrespective of any parameter.
  2. Will fetch all the list of Companies present in my Application irrespective of any parameter.

The URL needs to be split into two Parts: Base Url and the Endpoint.

The Base URL remains the same for any module of the application but the Endpoint keeps changing according to the module requirement.

solvecontactapi

The above picture makes it quite clear how to split the URL into two parts.

Request Headers and Parameters:

Always note down the request parameters and headers you need to provide while making an API call to get a successful response, 200Ok

Now you are actually communicating with your REST application!!!

Let’s proceed towards the steps.

Integrate-Business-Apps-through-APPSeCONNECT

Technology app Creation

After getting valid credentials of the APPSeCONNECT portal in your registered mail id, log in to the portal. You will need to change the password when you first log in to the portal. After completion of this basic step, concentrate on the left-hand vertical menu bar.  Click on Apps>> Choose Apps. From the dropdown select ‘Microsoft Dynamics NAV’ and the version ‘>=2009’. Then click on ‘Add’.

From the ‘Choose App’ dropdown select ‘Create Technology App’.

techappcreation

Now fill in the new tech app details, which is in this case ‘Solve 360 CRM’.

  • App name: Solve CRM
  • Description: REST Application
  • Adapter (select the proper Radio Button): REST
  • Cloud enable (select the check box): Tick the check box.

techapp

Your personalized TECH app is now ready!!!!

Now on the app page, you will find two apps: the first is the Microsoft Dynamics NAV and the next is Solve 360 CRM.

So the apps selection is now complete.

Integrate-Business-Apps-through-APPSeCONNECT

Schema Addition

In this step, you can add the data packet structure of any specific module of an application. As Solve 360 CRM is the new tech app that we have created, we now need to create or import the Schemas. Creating schemas is a time taking process and here APPSeCONNECT eases the process by providing you the feature to import the schema where schema creation can be done within a couple of minutes.

Here you need to import two schemas one for the ‘Company’ module and the ‘Contact’ module.

After you have fetched data records for both ‘Company’ and ‘Contact’ in postman, store these data responses individually with the extension of ‘.xml’.

 

  • Go to App >> Click on (+) >> Schema >> Import >> Click on XML >> Add the file from the proper location >> Click on ‘Display’.

protocl

  • The next screen which appears is:

importschema

  • Choosing the file of Contact.xml, provide the root element and click on display.

upload schema

  • After saving, the schema gets imported.

Do remember to set a unique attribute as ‘Primary key’ as it will generate the list of record ids in the resync bucket.

schema definition

Endpoint Configuration & Action and Error filter Configuration

Under the Prerequisite discussion, what is an endpoint and why do we need it? The answer to these questions is quite clear. Endpoint clearly is the name of the module which we want to access. The name of the Endpoint is the field that actually contacts with the base URL to form a Base URL.

Endpoint Configuration:

To define the endpoint Go to App >> Click on (+) >> Schema >> Add Action(+)

action

  • Endpoint: contacts
  • Description: Gets contacts from solve 360 CRM

actiondescription

Integrate-Business-Apps-through-APPSeCONNECT

Action Filter Configuration:

After defining the endpoint for the REST-based connection by providing the endpoint name and description. Click on ‘Save’. The below screen appears. You now need to Define the HTTP method and content type and required headers and parameters. Always click on the Save icon after defining the header or parameter.

[Defining Header and Parameter Varies from application to application. Some apps might need both, some might just need Header/parameter]

filter configuration

Solve 360 CRM requires only parameters. I wish to fetch data from the app with respect to date and time. Thus using the parameter ‘created’ as the key. The list of usable parameters is available in the API Documentation of SOLVE CRM 360.

To get data with respect to date and time always define the value for that parameter or header to be ~{ReadDate(‘yyyy-MM-ddTHH:mm:ssK’,’0′)}~ where the key will be the name of the field or parameter [depending on the app used].

Integrate-Business-Apps-through-APPSeCONNECT

Error Filter Configuration:

You now need to Define the HTTP method and content type same as the Action filter.

This configuration will help to resync failed Data records.

error filter

Under the resource path section, in the key section provide the endpoint_name/$. In this case, it is ‘contacts/$’.Always click on the Save icon after defining the resource path. The value field will remain blank.

Create another Endpoint for Posting companies [under the company schema] to Solve 360 CRM. Choose the HTTP method to be POST and so on.

Connection Creation

Again concentrate on the left-hand vertical menu bar in the APPSeCONNECT Portal.  Click on Connections>> Create Connections>> Configure Connector.

connection creation

Provide the connection name. Click on the check box for ‘Is Cloud Supported’ and then ‘Save’.

save connection

Workflow Creation

Again concentrate on the left-hand vertical menu bar in the APPSeCONNECT Portal.  Click on Workflow>> Create workflow.

From the left-hand menu drag the start node

start node

followed by the ‘Template>>General Template>> Create Touchpoint’ option.

touchpoint creation

After you click on ‘Create Touchpoint’, Provide details like Name, Group (transactional Data), Description. Then click on next.

touchpoint creation wizard

The Source Setup Page opens. Select the mandatory fields – Schema, Action, Protocol and the Method. You can also Add New Schema & New Action, by clicking on the respective buttons. Click on the Continue button.

setup touchpoint

Note: The Schema and the Action should be selected according to the nature of the touchpoint. Suppose, the touchpoint is of Product Add, the Schema and the Action should be selected for the Product only.*

Integrate-Business-Apps-through-APPSeCONNECT

In this case :

Schema: Item   Action: Get contacts from solve CRM

Now Click on ‘Continue’.

The Target Setup page opens. Fill the mandatory fields – Schema, Action, Protocol, and Method. Similar, to the Source Setup here too New Schema/New Action, can be added by clicking on the respective buttons. Click Continue Button.

uploading adapter

The Transformation/Mapping Page opens

transformation

The data coming from the source schema requires to be transformed individually such that it matches the format of the destination schema, every time the touchpoint is synced.

In this case on the left, you will find the fields of the Contact Person Card of Microsoft Dynamics NAV, now you need to do the mapping from the fields from the Contact data Packet of Solve CRM. We will be doing it according to the table:

 

Fields in Solve CRM (Source App) Fields in Microsoft Dynamics NAV (Destination App)
name Name
businessemail Email
cellularphone Phone No

 

Transformation:

Under the For-each-loop section, Here a loop is set relatively than writing the transformation logic multiple times, and this undergoes execution whenever the touchpoint is synced in the For-Each Loop Node. The XPath of the loop is written with respect to the input packet.

mapping

Root Variables:

A root entity variable is a variable that is value specific to every iteration. Every entity item has this variable declared with it such that it is present in every iteration and has a different value for every schema item.

The Root Entity Variables used in this case is:

  1. maxDate: This root variable needs to be added to the mapping section when the source app is configured using the REST adapter. This root variable fetches the date and time of the latest data record created in the Source app and store it so that whenever the sync is executed after the first sync, it does not fetch the old records every time. This ensures a quick sync process.
  • Root variable name: maxDate
  • Type: String
  • Mapping: [sourcelib:WriteMaxDate(..,'{parent tag for each individual record}’,'{tag which as the value of the date & time when the record got created /updated}’,’1′)]
  • Example: [sourcelib:WriteMaxDate(..,’Customer’,’createTime’,’1’)]

After completion of transformation section click on ‘Continue’.confirmation

Then click on finish.

Drag the End node.

Connect all three, that is Start, Group node, end.

workflow creation

  1. Click on ‘Reset Generate’.
  2. Click on ‘Reset Publish’.
  3. Name the Workflow.
  4. Publish the Workflow.
  5. Save the workflow.

Again concentrate on the left-hand vertical menu bar in the APPSeCONNECT Portal.  Click on Workflow. You will find the list of workflows in your organization.

Activate the workflow.

activate

Similarly, create a Company Add Workflow which adds Customers from NAV to solve CRM.

Integrate-Business-Apps-through-APPSeCONNECT

Credential validation.

  • To set the credentials Go to App >> Click on (+) >> Credentials.Do this step for both the apps you are using that is NAV and Rest app: Solve 360CRM
  • Provide the credential name.
  • The base URL of the application. In this case, it is: https://secure.solve360.com/
  • Content type: application/xml
  • Authorization: From the dropdown select the desired auth type, basic or Oauth2.0
    I have chosen Basic as it goes with the Solve 360 CRM.
  • Provide the username and Password.
  • Click on ‘Save’.

credential

Provide the credentials for NAV too. The Fields will be Different in this case. Click on Save.

Connection Deployment and Environment Setup.

  • Go to the Connection page now, hover on the connection you have created. Click on the ‘Configuration Assignment’ button.

deployment

  • Select the credentials you want to assign for the apps. Click on ‘Save Changes’.

deploying connection

  • Hover on the same connection, Click on the toggle button to deploy the connection.

already setup connection

  • Now the credentials have been deployed in the connection. The Bluetick ensures the same

activate and schedule

  • On the left portal menu, Go to Manage >> Environment>> Create Cloud Environment.

creating environment

  • Then the following screen appears. Click on Save.

create cloud environment

  • Your environment is now ready.

Integrate-Business-Apps-through-APPSeCONNECT

Workflow Execution

  • Go to the Workflow Page>> Open the created workflow>> Click on the play button

play workflow

  • The Workflow execution starts with a message: Workflow Started.

in execution workflow

  • After the Execution is done, click on the group node>> Resync Bucket.

executed data repository

  • You will find the data in the resync bucket and its status as well.

Conclusion:

After the completion of only these eight steps, you can completely integrate your REST application with Microsoft Dynamics NAV.

APPSeCONNECT is the platform that allows you to integrate your personal REST application as per your requirement with your ERP: Microsoft Dynamics NAV.

Any application which follows a REST protocol can be used to integrate with the choice of application you want.

Search

Search

Free Trial / Demo

Try the APPSeCONNECT Integration Platform for 30 Days or request a free demo.
APPSeCONNECT-Horizontal Logo_SVG
appseconnect-New-Logo_2022.png

Start Your Automation Journey With Pre-Built Connectors.

Get a Demo. Try it Free.

G2 winter badges 2024
we use cookies
We use cookies to personalize your experience. Your visit and usage of this website is subject to acceptance of our Privacy Notice and Cookie Policy.