CreateIncidentReceipt Message

The CreateIncidentReceipt Message is the asynchronous receipt that is sent after processing the Createincident Message.

After clicking the 'Messages' icon, you will see the following screen (note: the previously configured message is visible in the list):

1) Click New.

New Message Modal

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

Your CreateIncidentReceipt New Message modal should look like this:

5) Submit and view to further configure the Message.

Response Fields

Navigate to Message > Response.

The Response fields to be configured are as follows:

Your Response form should look like this:

7) Navigate to Inbound > Settings.

Inbound Settings Fields

The Inbound Settings fields to be configured are as follows:

The code in the 'Reference lookup script' field should look like this:

var answer = {};

answer.getExternalMessageID = function (payload, request) {
  return '' + (payload.message.source_id || '');
};

answer.getInternalMessageID = function (payload, request) {
  return '' + (payload.message.target_id || '');
};

Reference lookup script: In an asynchronous integration it's important to identify which message an asynchronous receipt is replying to. This script extracts the transaction's unique identifier.

In the case of an inbound create/update it would return their external message id (source id) to identify which transaction our asynchronous receipt belongs to. In the case of an inbound asynchronous receipt it would return our internal message id (target id) to identify which transaction their asynchronous receipt belongs to.

Your Inbound Settings form should look like this:

9) Navigate to Advanced > Script Editor.

Script Editor Fields

The Scripts are where the request processing and data mapping occurs. They are also the place where Bond state & ownership are set.

When you first open the Script Editor, you will see the following:

Having visibility of your message scripts in the one pane makes scripting so much more efficient.

Because we are dealing with an inbound message, we can adjust the view to only show the 'Payload to Stage' & 'Stage to Target' script fields.

10) Navigate to View > Inbound.

Your Script Editor fields will initially look like this:

Scripts

We will primarily by utilising OOTB Fields & Field Maps to configure our Message Scripts. In the current release, however, there is no OOTB Field Map record with which we can set the state on the Bond. We shall, therefore, script that manually. For more information , see the 'Fields' & 'Field Maps' pages in our technical documentation.

The Script Editor fields to be configured are as follows:

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

bond.setOpen();

Your Script Editor fields should now look like this:

12) Click 'Save'.

13) Click 'Close' to navigate back to the Message.

We are now ready to configure the Fields for our CreateIncidentReceipt Message.

Last updated