Lookup Table

POST {{_endpoint}}/services/data/v{{version}}/connect/business-rules/decision-table/:decisionTableId

Decision Table (Lookup Table)

Performs a lookup on a decision table.Resource

/connect/business-rules/decision-table/${decisionTableId}

Resource Example

https://yourInstance.salesforce.com/services/data/v55.0/connect
/decision-table/0lDB0000000TNQzMAO

Available version

55.0

Requires Chatter

No

HTTP methods

POST

Request body for POST

JSON example

{
   "conditions" : {
      "conditionsList" : [
         {
            "fieldName": "state__c",
            "value": "MH"
         },
         {
            "fieldName": "validity__c",
            "value": 30
         }
      ]
   }
}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
conditionsDecision Table Condition[]The list of decision table conditions on which the decision table executes and provides outcomes.Required55.0
datasetLinkNameStringThe API name of the dataset link provided as an input for the decision table execution.Optional55.0

Response body for POST

Decision Table Outcome

Decision Table Outcome

Output representation of the decision table execution.JSON example

{
  "errorCode" : null,
  "errorMessage" : null,
  "outcomeList" : [ {
    "values" : {
      "amount__c" : "399",
      "Name" : "MH 005"
    }
  }, {
    "values" : {
      "amount__c" : "499",
      "Name" : "MH 006"
    }
  }, {
    "values" : {
      "amount__c" : "379",
      "Name" : "MH 007"
    }
  }, {
    "values" : {
      "amount__c" : "1498",
      "Name" : "MH 008"
    }
  }, {
    "values" : {
      "amount__c" : "98",
      "Name" : "MH 009"
    }
  }, {
    "values" : {
      "amount__c" : "251",
      "Name" : "MH 010"
    }
  } ],
  "outcomeType" : "Multiple Matches",
  "successStatus" : true
}

Property NameTypeDescriptionFilter Group and VersionAvailable Version
errorCodeIntegerThe error code if transaction fails for any reason.Small, 55.055.0
errorMessageStringThe error message if transaction fails for any reason.Small, 55.055.0
outcomeListDecision Table Outcome Item[]Outcome list that stores two or more outcomes provided by the decision table.Small, 55.055.0
outcomeTypeStringThe outcome type after the request is successful.Small, 55.055.0
successStatusBooleanIndicates the status of the decision table execution.Small, 55.055.0

Request Body

{"conditions"=>{"conditionsList"=>[{"fieldName"=>"IsDeleted", "value"=>true}]}}

RESPONSES

status: Created

{"errorCode":null,"errorMessage":null,"outcomeList":[],"outcomeType":"No Match","successStatus":true}