All pages
Powered by GitBook
1 of 2

Loading...

Loading...

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:

5) 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:

8) 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:

11) 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:

13) 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:

Your Script Editor fields should look like this:

15) Click Save.

We can now move on to Testing.

Process this message when the bond state is Pending.

<true>

10

Bond open

Process this message when the bond state is Open.

<true>

#

Field

Description

Value

1

Message name

The message name that is unique for this integration.

'AddAttachmentInbound'

2

Type

The primary purpose of the message.

'Update'

3

Direction

The direction(s) this message is configured to support.

'Inbound'

4

Description

The description for this message and the requirement it is meeting.

<Your description>

#

Field

Description

Value

6

Response

The immediate synchronous response to this message.

<lookup: 'Response'>

7*

Async

Turn this option on if you want inbound processing to occur asynchronously or this message is the first of an asynchronous message pair.

<false>

#

Field

Description

Value

*

Bond ownership

Determine if the sender should own the bond or not in order for this message to be processed? Use 'Ignore' to process regardless of the owner flag. (Choices: Ignore, Must own, Must not own.)

'Ignore'

*

Bond condition type

The type of conditional check made on the bond. (None: no checks are made. State: checks against the state are made using the conditional checkboxes. Scripted: the 'Bond condition' script is used.)

'State'

9

#

Field

Description

Value

12

Bond reference method*

Method of searching for and validating an existing bond for incoming messages.

'Internal'

#

Field

Description

Value

14

Payload to Stage (Inbound)

The script to run.

Replace the commented out instructions with the code below.

Bond pending

(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);

Messages

We will need to configure a new inbound Message to process the attachments returned from the poll. We will also utilise all the previously configured Messages in testing our Integration.

Inbound Messages

In order to process the attachments returned from the remote system we will configure a new inbound Message.

  • AddAttachmentInbound

Because we have edited the Endpoint URLs in the Connection, the Create Poll Processor and the Parent & Child Poll Processors, we will utilise the Messages we created in the earlier Guides in order to test the Integration and process the data that is returned from the remote system. The following Messages will be used:

  • CreateIncidentInbound

  • UpdateIncidentInbound

  • ResolveIncidentInbound

  • CreateIncidentResponse

Outbound Messages

For the same reason as above and because we have edited the outbound Message Path for the previously configured Messages, we will need to test those also. The following Messages will be used:

  • CreateIncident

  • UpdateIncident

  • ResolveIncident

  • CreateIncidentInboundReceipt

Let's now configure the AddAttachmentInbound Message.

AddAttachmentInbound Message