Microsoft Dynamics Navision Authenticate an Element

You can authenticate with Microsoft to create your own instance of the Microsoft Dynamics Navision element through the UI or through APIs. Once authenticated, you can use the element instance to access the different functionality offered by the Navision platform.

Authenticate Through the UI

Use the UI to authenticate with Microsoft and create an element instance as described in Authenticate an Element Instance (UI). In addition to the base authentication parameters, you will need to enter credentials in the following mandatory fields:

Navision Company Name - CRONUS Canada, Inc. which is mentioned on the top right corner of the configuration page. If you have questions about identifying your Navision company name, contact the administrator of your Navision server.
Navision Server Host Name - 
The URL of the host server.
Navision Server Instance Name - 
The name of the server instance you set up in API Provider Setup.
Navision Service Configuration - 
Is pre-populated but can be edited when necessary.

After successfully authenticating, we give you several options for next steps. Make requests using the API docs associated with the instance, map the instance to a virtual data resource, or use it in a formula template.

Authenticate Through API

Authenticating through API is similar to authenticating via the UI. Instead of clicking and typing through a series of buttons, text boxes, and menus, you will instead send API calls to our /instances endpoint. The end result is the same, though: an authenticated element instance with a token and id for future API calls.

If you are configuring events, see the Events section.

To create an element instance:

  1. Construct a JSON body based on your authentication type. See Parameters for detailed descriptions.

    Basic Authentication

{
  "element": {
    "key": "dynamicsnavisionerp"
  },
  "configuration": {
    "navision.service.configuration": [
   {
    "objectName":"Company Details",
    "serviceName":"Company Details"
   },
   {
    "objectName":"Contact Card",
    "serviceName":"Contact Card"
   },
   {
    "objectName":"Item Card",
    "serviceName":"Item Card"
   },
   {
    "objectName":"Sales Order",
    "serviceName":"Sales Order",
    "documentType":"Order"
   },

   {
    "objectName":"Sales Invoice",
    "serviceName":"Sales Invoice",
    "documentType":"Invoice"
   }, 
 ],
    "navision.company.name": "xxxxxxxxxxxx",
    "navision.server.host.name": "xxxxxxxxxxxxxxxxxxxx",
    "navision.server.instance.name": "DynamicsNav100",
    "username": "xxxxxxxxxxxxxxxxx",
    "password": "xxxxxxxxxxxxxxxxx",
  },
  "tags": [
    "<Add_Your_Tag>"
  ],
  "name": "<INSTANCE_NAME>"
}

Call the following, including the JSON body you constructed in the previous step:

  • POST /instances

Example cURL

Basic Authentication

curl -X POST \
  https://api.cloud-elements.com/elements/api-v2/instances \
  -H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
  -H 'content-type: application/json' \
  -d '{
  "element": {
    "key": "dynamicsnavisionerp"
  },
  "configuration": {
    "navision.service.configuration": [
   {
    "objectName":"Company Details"'
    "serviceName":"Company Details"
   },
   {
    "objectName":"Contact Card",
    "serviceName":"Contact Card"
   },
   {
    "objectName":"Item Card",
    "serviceName":"Item Card"
   },
   {
    "objectName":"Sales Order",
    "serviceName":"Sales Order",
    "documentType":"Order"
   },
   {
    "objectName":"Sales Invoice",
    "serviceName":"Sales Invoice",
    "documentType":"Invoice"
   },
  ],
    "navision.company.name": false,
    "navision.server.host.name": "my_account_id",
    "navision.server.instance.name": true,
    "username": "my@somewhere.com",
    "password": "my_secret_password",
  },
  "tags": [
    "xxxxxxxxxxx"
  ],
  "name": "<INSTANCE_NAME>"
}'

Parameters


 Parameter

 Description Data 
 Type
 Required
 'key' The element key.
 dynamicsnavisionerp
 string
 Name
name
 The name for the element instance     created during authentication. Body
 Company Name
navision.company.name
 

 Navision Server Host Name
navision.server.host.name
 The link to the host server.

 Navision Server Instance Name
navision.server.instance.name
 The name of the server instance you set up.

 Authentication Type
authentication.type
 The authentication type, which must be basic string Y
 Email
username
 The email of a NetSuite authenticated user (only applicable for Basic authentication) string Y if Basic   Authentication
 User Password
password
 The password of a NetSuite authenticated user (only applicable for Basic authentication) string Y if Basic   Authentication

Example Response

In this example, the authenticated element instance ID is 12345 and token starts with ABC/D.... Your values will be different. Make sure that you save the id and token for future requests.


{
    "id": 12345,
    "name": "Navision Instance 1",
    "token": "qIY3vwXqQh+XiM7wLOz3+h2VeZaH9y+AuDRSfLCQ4+8=",
    "element": {
        "id": 28982,
        "name": "Navision Instance 1",
        "key": "dynamicsnavisionerp",
        "description": "Microsoft Dynamics Navision",
        "active": true,
        "deleted": false,
        "typeOauth": false,
        "trialAccount": false,
        "configDescription": "Microsoft Dynamics Navision",
        "base.URL": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    },
    "provisionInteractions": [],
    "valid": true,
    "disabled": false,
    "maxCacheSize": 0,
    "cacheTimeToLive": 0,
    "cachingEnabled": false
}

After authenticating with Microsoft Dynamics Navision you can refer to these use cases to make use of the application.