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.
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.
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.
The Inbound Settings fields to be configured are as follows:
The code in the 'Reference lookup script' field should look like this:
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.
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:
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:
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.
#
Field
Description
Value
2
Message name
The message name that is unique for this integration.
'CreateIncidentReceipt'
3
Type
The primary purpose of the message.
'Receipt'
4
Direction
The direction(s) this message is configured to support. (Choices: Inbound, Outbound, Bidirectional)
'Bidirectional'
#
Field
Description
Value
6
Response
The immediate synchronous response to this message.
<lookup: 'Response'>
#
Field
Description
Value
8
Reference lookup script
The script containing functions for extracting internal and external references from the request payload.
Update the code in the Reference lookup script field so that it looks like the code below
#
Field
Description
Value
11
Stage to Target (Inbound)
The script to run.
Replace the commented out instructions with the following code: bond.setOpen();