Outcome message example

This section describes the data in the message that the system produces when you use a queue data source connector for Outcomes.

Outcome message format using the queue connector

When you use a queue connector for the Outcome data source, the message has the format shown in the following table.

In addition, the following rules apply.

  • System-defined field names are camel case.
  • Data types start with a capital letter.
  • Valid data types are String, Integer, Double, Currency, Boolean, Date, and Tabular.
  • Values for Date and String data types are surrounded with double quotes.
  • Values for Integer, Double, Currency, Boolean, and Tabular data types are not surrounded with double quotes.
Table 1. JMS message format for Outcome data
Name Value
producerName OpportunityDetect
clientID If you have multiple Opportunity Detect installations, enter the ID of the installation where this queue connector is used, as defined in the clientId property under the IBM Opportunity Detect And Interact Adv Patterns | System category on the Settings > Configuration page. If you have a single Opportunity Detect installation, this value should be default.
actionName The name of the Action component that produced the Outcome.
workspaceName The name of the workspace.
deploymentName The name of the deployment that is running the workspace.
outputVersion The output version number entered on the Properties tab of the deployment configuration.
data The data you have specified in the Action component for your Outcome, plus the data that is included in every Outcome.

Outcome data always includes the audience ID, audience level, the ID of the Action component, and a time-stamp.

Time-stamps have this format:

yyyy-MM-dd HH:mm:ss

Additional fields that you specify in the Action component are output with the label you give the field in the Action component, the value, and the data type. This data can be a single value (scalar), or a row in a data record stored in a Container or Select component (tabular).

Example of the Outcome message using the queue connector

Here is an example of a message produced by the system when you use a Queue data source connector for an Outcome. Line breaks have been added for readability.


producerName: OpportunityDetect,
clientID :default,
actionName:  "Name of Action component"
workspaceName :  "Name of workspace"
deploymentName : "Name of deployment"
outputVersion: "Version", 

data = [
  { 
    "message": {
        "value": "Pass", 
        "dataType": "String"
        } 
  },
  { 
    "audienceId": {
        "value": "acc333", 
        "dataType": "String"
        } 
  },
  { 
    "audienceLevel": {
        "value": "audienceLevelvalue", 
        "dataType": "String"
        } 
  },
  { 
    "componentId": {
        "value": "AA123344555666", 
        "dataType": "String"
        } 
  },
  { 
    "firingtime": {
       "value": "2014-04-01 05:40:01", 
       "dataType": "Date"
        } 
  },
  { 
    "fieldName1": {
        "value": 333, 
        "dataType": "Integer"
        } 
  },
  { 
    "fieldName2": {
        "value": "2014-04-01 05:40:01", 
        "dataType": "Date"
        } 
  },
  {
    "fieldName3": {
        "value": {
            "header" : [
                {
                    "tablefield1": {
                     "dataType": "String"
                    },
                }
                {
                    "tablefield2": {
                     "dataType": "Date"
                    }
                },
            ]
            rows : [
                    { 
                      "values" : ["value1","value2"]
                    },
                    { 
                      "values" : ["value1","value2"]
                    },
                    { 
                      "values" : ["value1","value2"]
                    },
              ]
         }, 
         "dataType": "Tabular" 
      }
   } 
]