Setup
Integration
Madden integration can be setup for using more than one instance of madden. Every instance is called a “Madden integration”.
Every integration object is setup by using a “Code”. This code is normally called “PROD” for production or “STAGE” for test-environments.
Communication
Each integration needs to be able to authorize and communication with the Madden api.
Base URL – URL to the api
Authorization
API Key: Provided by Madden Analytics administrators.
Account Id: Provided by Madden Analytics administrators.
Integration Objects
Integration objects is where you setup which data that should be sent to the Madden API.
The different types of messages:
Example setup:
Object setup
Each integration object has a couple of parameters that needs to be setup.
Product data mapping
Product data can be used in many different ways inside Business Central. To make sure that this can be handled efficiently this can be setup by the user themselves.
Source table:
First the source table for the product data needs to be defined. This is normally either Product or Product Variant. In all cases variants is used in Business Central the table Product variant must be set.
Set the table by clicking in the source table column and set the correct table (Item = 27, Item Variant = 5401).
Field mapping
The API-keys for madden can be imported by copying the json-object from Madden API documentation-site and then imported as a file. The result of the import is a set of lines with all the keys that needs to be mapped for a product.
Open the product data mapping by selecting the “Product Data Object” and then clicking “View fieldmapping”.
Example:
Columns
Column name | Description |
MA Key | The name of the key in madden API |
Line Type | Header, Line Array, Entity Reference |
Line Type Ref | Reference to another object in integration object list to set sublines in a Line Array for example. |
Field Type | Defines which type the field is in Business Central |
Field Name | The name of field in Business Central and this is where the mapping is done. |
Field Caption | The caption of the field for better understanding which field has been selected. |
Field Name 2 | If field name 2 is set the data is concatenated with “Field Name” |
Field Caption 2 | See Field Name. |
Negate | Inverts the value of the field from Business Central |
Active | Only active fields are send to Madden. |
Sub Table No. | If Line Type is set to “Line Array” or “Entity Reference” a sub table is used. See Line Type chapter |
Sort Order | The fields can be sorted and send in specific sort order. Not necessary but can be used to create a nice looking JSON-file. |
Line Type
Header:
Is used when a field is found in the same table as the integration object has as a source table
Entity Reference:
Is used when a field is found in a sub table to the integration object source table. To be able to use this a “Sub Table No.” must be set.
Example:
productName is often used as the product description and is found in the Item table. To be able to retrieve the data from Item a link must be setup for the Item-table.
Line Array:
Is used when a sublist of entities needs to be send. For example, a sales order has many sales lines.
The setup is the same as entity reference except that a “Line Type Ref” needs to be filled in which is in the above example setups how the sales lines needs to be send.