RealTime Output
- 1 Overview
- 2 Plugin Configuration
- 2.1 General
- 2.2 Rule Priority
Overview
DDE rules can return data to the system that called the rule
The return data will be either:
A single field within the rule
A JSON message, created from several fields within the rule
A HTTP code
A static value
Example:
A rule has been created that requires Customer information to be stored. The following JSON message will be passed to the rule from a website:
{
"Customer Id": 1,
"Email Address": "ExampleOne@domain.com",
"Customer Name": "Example One"
}
The Realtime Input will receive this JSON.
Plugin Configuration
General
Within the General tab:
The following settings can be configured:
Setting | Description |
---|---|
Use Single Input Field | Select this option to populate the “Output Field” with the data from another field specified in the “Input Field” selection: In the above scenario, the data returned to the system that called the rule will be populated by a field called OutputJSON. An appropriate HTTP code can be selected if required. |
Build JSON From Input Field(s) | Select this option to populate the “Output Field” with the data from fields specified within the “Select Fields” tab:
Get Fields will pull in the fields in the flow of the rule. In the above scenario the data returned will be populated with the fields specified: {
"Effort": "1",
"Priority": "High",
"Pet1": "Dog",
} An appropriate HTTP code can be selected if required. |
Return HTTP Code | Select this option to simply return a specific HTTP Code to the system that called the rule: If the Http Code “307 Temporary Redirect” is selected, then it is possible to return data from an “Input Field” : This could be a status image URL, for example. |
Return Static Value | Select this option to return an HTTP Code and a static value to the system that called the rule. The “Response Content Type” should be set to “text/plain” to return a static value: If the Realtime Output has the above configuration, the Response Body will contain the following: An appropriate HTTP code can be selected if required. |
Rule Priority
It is possible to specify the rule priority for an output. Priority can be used if a rule is called from within a Rule Group. The priority is then returned for each rule, showing providing an ordered list of priorities results.
This can be used to determine which content to display, allowing the ability to show the top x results, for example.
Within the Rule Priority tab:
The following settings can be configured:
Setting | Description |
---|---|
Use Fixed Priority | Select this option to return the priority specified in the text box: In the above example the rule will output a priority value of 10. In Rule Designer this will automatically be created as a parameter so this can be changed if needed without further template alterations. |
Get priority from an input field | Select this option if the rule priority is specified in a field: In the above example the rule will output a priority value from the field “PriorityScore”. Accepting a priority score from an input field allows the priority to be dynamically populated for each row of data based on the other input fields received and the other steps in the Template. For example someone with a high value persona could trigger a higher priority than a low low value persona. This could result in the high value user getting an outbound phonecall where the low value gets an email and SMS. |