> For the complete documentation index, see [llms.txt](https://docs.sharelogic.com/unifi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sharelogic.com/unifi/4.0/configure/how-to-guides/how-to-handle-attachments/test-addattachment.md).

# Test AddAttachment

{% hint style="success" %}
If necessary, create at least one bonded record in order to test the AddAttachment Message.
{% endhint %}

## Update Bonded Record (Originating Instance)

In the originating instance, **select one** **bonded ticket** and **Add** an **attachment** to the record .

![](/files/bLg157BmhuKAubRipdmp)

## Review Outbound Transport Data

From the bonded record, navigate to the **Unifi Integrations related list** and click to **open** the **Bond**.

![](/files/ioKiWkdGA5AOegEmdMN7)

{% hint style="success" %}
The External reference is populated. The State is "Open" and the Status is "OK".
{% endhint %}

From the Bond, navigate to the following related lists:

Navigate to the **Bonded Attachments related list** and verify that a **Bonded Attachment** record has been **created**.

![](/files/3YKtIsKxLLa9gBVhRU2Z)

{% hint style="success" %}
The State is "Complete".
{% endhint %}

Navigate to the **Transactions related list** and click to **open** the **AddAttachment Transaction**.

![](/files/lzdOxOJPPpkC2MMSWhDe)

{% hint style="success" %}
The Transaction state is "Complete" and the Process state is "Accepted".
{% endhint %}

From the Transaction, navigate to the **HTTP Requests related list** and click to **open** the **HTTP Request**.

![](/files/bvSW4qBPlOS3LxwLgVuu)

{% hint style="success" %}
The Request state is "OK".
{% endhint %}

Note the following about the HTTP Request:

![](/files/fN4029x0FdxMoiRGK6wA)

{% hint style="success" %}
**Endpoint URL**: A concatenation of the Connection URL appended with the [Path](https://github.com/sharelogic/unifi-docs/blob/dev/how-to-guides/how-to-handle-attachments/broken-reference/README.md) defined on the Message.

**Request headers**\*: Contains the mime\_type.

**Request payload**\*: The payload contains the "sys\_attachment:\<sysid>" (the format which Unifi expects & automatically triggers outbound streaming).

\*These objects were defined in the [Stage to Request script](https://github.com/sharelogic/unifi-docs/blob/dev/how-to-guides/how-to-handle-attachments/broken-reference/README.md).
{% endhint %}

{% hint style="info" %}
You will never see the attachment data in the payload itself.
{% endhint %}

## View Bonded Record (Receiving Instance)

In the receiving instance, navigate to the **corresponding** **bonded ticket** and verify the **attachment** has been **added** to the record.

![](/files/UKY8jsAjNnSUti6jGaRw)

{% hint style="success" %}
The attachment has been added to the bonded record.
{% endhint %}

## Review Inbound Transport Data

From the bonded record, navigate to the **Unifi Integrations related list** and click to **open** the **Bond**.

![](/files/5tiMHECOZfRDt4xvsrey)

{% hint style="success" %}
The External reference is populated *(note: the Internal/External reference values are opposite to the originating bond)*. The State is "Open" and the Status is "OK".
{% endhint %}

From the Bond, navigate to the following related lists:

Navigate to the **Bonded Attachments related list** and verify that a **Bonded Attachment** record has been **created**.

![](/files/vPKVYVb4TWE6DsVRVWra)

{% hint style="success" %}
The State is "Complete".
{% endhint %}

Navigate to the **Transactions related list** and click to **open** the **AddAttachment Transaction**.

![](/files/dJTCtFN51yrnt0tNJv7D)

{% hint style="success" %}
The Transaction state is "Complete" and the Process state is "Accepted".
{% endhint %}

From the Transaction, navigate to the **HTTP Requests related list** and click to **open** the **HTTP Request**.

![](/files/wFrv5uD1FqQJikNwU3Rh)

{% hint style="success" %}
The Request state is "OK".
{% endhint %}

Note the following about the HTTP Request:

![](/files/YEggrPC7dLbF9VksKR5l)

{% hint style="success" %}
**Endpoint URL**: This is defined on the Resource path of the automatically generated Scripted REST Resource.

**Request payload**: The payload structure is defined in the [Scripted REST Resource script](https://github.com/sharelogic/unifi-docs/blob/dev/how-to-guides/how-to-handle-attachments/broken-reference/README.md).
{% endhint %}

**Congratulations!** You have successfully configured & tested a dedicated Message to stream inbound and outbound attachments.
