# Integration

## New Integration

Back in the **Unifi Integration Designer** window, after clicking either on the '**+**' **tile** or '**New Integration**', you are given a 'New Integration' modal to complete.

The fields to be configured for the New Integration modal are as follows:

|  #  | Field          | Description                                                                                                 | Value        |
| :-: | -------------- | ----------------------------------------------------------------------------------------------------------- | ------------ |
|  1  | Name           | The name of the integration.                                                                                | \<Your Name> |
|  2  | Service type   | The type of web service this integration is using *(SOAP/REST)*.                                            | 'REST'       |
|  3  | Message format | Automatically pre-process incoming messages for simpler message scripting. *(Choices: XML, JSON, Advanced)* | 'JSON'       |

*Your 'New Integration' modal should look like this:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQxZzFF9WpzPI_7XV2H%2F-MQxaL0IQDnzQEJzBb5s%2FV2%20-%20Integration%201.png?alt=media\&token=2941b7f3-f6f7-4ca1-b4a9-6e1610ecf045)

4\) Click **Create**.

You will be redirected to the Details page of the newly created Integration.

## Icons

{% hint style="info" %}
Before continuing we would like to draw your attention to some of the relevant icons that are now visible down the left hand navigation strip.
{% endhint %}

*The icons are:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQlXvjOOzOUbjeH6uS5%2F-MQlwm5ug9tYbgNVcJAE%2FV2%20-%20Integration%202.png?alt=media\&token=1ee2913b-864d-4554-9450-b55fdb518409)

a) ***'Integration' icon*****:** Opens the current integration's Details page.

b) ***'Messages' icon*****:** Opens the current integration's Messages page.

c) ***'Fields' icon*****:** Opens the current integration's Fields page.

d) ***'Field Maps' icon*****:** Opens the current integration's Field Maps page.

e) ***'Documentation' icon*****:** Opens the automatically generated documentation for the current integration. *(Another awesome feature in **Unifi**.)*

f) ***'Connections' icon*****:** Opens the current integration's Connections page.

## Details

*The Details page of your Integration should look like this:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQxZzFF9WpzPI_7XV2H%2F-MQxbLZXOKRA1b1ZKKLH%2FV2%20-%20Integration%203.png?alt=media\&token=ea164aca-a36d-4534-b113-4ba76758dd8e)

5\) Navigate to **Integration > Message Identification**.

## Message Identification Fields

{% hint style="info" %}
Unifi needs to identify the name of the inbound message in order to know how to process the inbound data.
{% endhint %}

6\) Update the code in the 'Identify message script' field so that it looks like this:

```javascript
function identify(payload) {

  return (payload.message.name || '') + '';

}
```

*The Message Identification form should look like this:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQxZzFF9WpzPI_7XV2H%2F-MQxc0jw9bE_A6Ard0dP%2FV2%20-%20Integration%204.png?alt=media\&token=80081a49-9bdf-4a34-ae21-efe2a96517f6)

7\) Navigate to **Settings > Feedback**.

## Feedback Settings Fields

The Feedback fields to be configured for the Integration record are as follows:

|  #  | Field              | Description                                                                                                              | Value   |
| :-: | ------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------- |
|  8  | Enable UI messages | Allow information and error messages to be shown to the user as UI Notifications. Only applies to certain notifications. | \<true> |

*The Feedback Settings form should look like this:*

![](https://796541950-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MQBk35gIi557UHt7QlJ%2F-MQxZzFF9WpzPI_7XV2H%2F-MQxcI7WfXR5fhgmtaYl%2FV2%20-%20Integration%205.png?alt=media\&token=282c3c3c-2d7e-4cbe-9bc8-1e19c529f85d)

{% hint style="info" %}
All of the remaining 'Settings' values are to be left as-is:

* Attachments Settings
* Bond Settings

All of the 'Error handling' values are to be left as-is:

* General
* Timeouts
* Retry
  {% endhint %}

9\) Click **Save**.

10\) Click the **'Connections' icon** to move on and configure the **Connection**.
