# 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/4.2/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/2EJsRh73QF1TvP9eLF8k/blobs/qyvjFXjiqDThOiRTCKw5/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**.
