AddAttachmentInbound Message

We will configure another inbound update type Message to process the attachment data returned from the poll and update our target record.

Click on the 'Messages' icon to open the Messages page. Click New.

New Message Modal

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

Your AddAttachmentInbound New Message modal should look like this:

Click Submit and view to further configure the Message.

Response Fields

Navigate to Message > Response.

The Response fields to be configured are as follows:

*This field is automatically defaulted to true.

Your Response form should look like this:

Navigate to Message > Bond.

Bond Fields

The Bond fields to be configured are as follows:

*These fields are automatically populated.

Your Bond form should look like this:

Navigate to Inbound > Settings.

Inbound Settings Fields

The Inbound Settings fields to be configured are as follows:

*Bond reference method:

Internal - lookup using the internal reference only.

External - lookup using the external reference only.

Both - lookup using both the internal and external references.

We have chosen the 'Internal' method because, in the payload we built, we supplied the correlation_id.

Your Inbound Settings form should look like this:

Navigate to Advanced > Script Editor.

Script Editor Fields

Click on View > Inbound.

The Script Editor fields to be configured are as follows:

The code in the 'Payload to Stage' script field should look like this:

(function processPayloadToStage(payload, stage, transaction, message) {

  // set either internal/external reference on stage depending on what is needed.
  // make sure to configure the Bond reference lookup on the Message to be Internal/External

    stage.internal_reference = payload.correlation_id;

})(payload, stage, transaction, message);

Your Script Editor fields should look like this:

Click Save.

We can now move on to Testing.