# Message Identification

When we configured our Outbound Incident Integration we weren't concerned with identifying inbound messages, because there weren't any (we were only sending outbound).

Now that we're polling our PDI for data as well as sending data, we need to be aware of the above concern.

To facilitate this we need to make a change to our Integration.

## Message Identification

{% hint style="info" %}
This script is necessary because we have chosen to include the Message name in the structure of the payload object *(see* [*Response Script*](https://docs.sharelogic.com/unifi/integration-guides/polling/poll-processor#response-script) *on the 'Poll Processor' page)*. If we had chosen instead to set it in the options object, it would have been processed and passed to Unifi for automatic Message identification - without the need to configure this script.
{% endhint %}

To enable the Integration to identify which messages to use to process inbound requests:

Navigate to the **'Integration' icon** to open **< Your Integration >**, then navigate to **Integration > Message Identification**.

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://content.gitbook.com/content/Dk6VgKBXe6rYT8F9wuaY/blobs/2ntWcZ8qT7O4St2er9Q4/iupg-message-identification-1.png)

**Save** the record.

In order for both systems to identify and understand which records are bonded, we need to make a few more changes which we shall group together under the heading of **Bond Identification**.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sharelogic.com/unifi/integration-guides/incident-update-poller-guide/message-identification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
