{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":744,"path":"api-reference/server-api-reference/DecisionTableAPI.md","title":"DecisionTableAPI - Scoped, Global","bundle":null,"doc_type":null,"release":"australia","body":"\n# DecisionTableAPI - Scoped, Global\n\nThe DecisionTableAPI class enables you to access Decision Tables data in scoped and global server-side scripts.\n\nTo access DecisionTableAPI methods, use the `sn_dt` namespace. You must have the decision\\_table\\_crud\\_api role to use this API. To learn more about Decision Tables, see [Decision Tables](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/decision-table.md).\n\n## Date/Time inputs\n\nWhen using date/time inputs in a decision table, values passed to DecisionTableAPI must be provided in the ServiceNow dateTime format:\n\n```\nyyyy-MM-dd HH:mm:ss\n\n```\n\nDate/time values are processed without applying time zone conversion. All comparisons are performed using the internal UTC representation of the dateTime value.\n\nAs a result:\n\n-   Decision table inputs don't support time zone offsets.\n-   The system doesn't apply user and system timezones during evaluation.\n-   `between` conditions compare the literal dateTime values exactly as provided.\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## DecisionTableAPI - DecisionTableAPI\\(\\)\n\nInstantiates a DecisionTableAPI object.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n```\nvar dt = new sn_dt.DecisionTableAPI();\n```\n\n## DecisionTableAPI - createAnswerElementChoices\\(String decisionID, Array questions\\)\n\nCreates multiple records in the Choices \\[sys\\_choice\\] table that are linked to answer elements.\n\n<table id=\"table_u5r_1zg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\nchoices\n\n</td><td>\n\nArray\n\n</td><td>\n\nArray of objects used to create records in the Choices \\[sys\\_choice\\] table. Each object creates one choice record.```\n[\n  {\n    \"answerElementID\": \"String\",\n    \"label\": \"String\",\n    \"order\": Number,\n    \"value\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nchoices.answerElementID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the answer element to associate with the choice.Table: Result \\[sys\\_decision\\_multi\\_result\\_element\\]\n\n</td></tr><tr><td>\n\nchoices.label\n\n</td><td>\n\nString\n\n</td><td>\n\nLabel of the choice.\n\n</td></tr><tr><td>\n\nchoices.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Order of the choice.\n\n</td></tr><tr><td>\n\nchoices.value\n\n</td><td>\n\nString\n\n</td><td>\n\nValue of the choice.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nObject with information about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"results\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results\n\n</td><td>\n\nArray with information about the status of each choice.Data type: Array\n\n ```\n\"results\": [\n   {\n      \"errors\": [Array],\n      \"record\": GlideRecord,\n      \"status\": \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors\n\n</td><td>\n\nError information for the choice.Data type: Array\n\n ```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.message\n\n</td><td>\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.type\n\n</td><td>\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.record\n\n</td><td>\n\nGlideRecord reference to the choice created in the Choices \\[sys\\_choice\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.status\n\n</td><td>\n\nStatus that indicates whether the choice record was successfully created.Possible values:\n\n-   Failure\n-   Success\n\n Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example creates two choices for an answer element.\n\n```\nvar decisionID = 'a45be18c3d839910f8776a598af91269';\nvar answerElementID = '99d197c83d0b9910f8776a598af912df';\nvar choices = [\n   {\n      label: 'Hyderabad',\n      value: 'hyd',\n      answerElementId: answerElementID,\n      order: 20\n   },\n   { \n      label: 'Mumbai', \n      value: 'mum',\n      answerElementId: answerElementID,\n      order: 40\n   }\n];\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.createAnswerElementChoices(decisionID, choices);\ngs.info('Status - ' + response.status);\ngs.info('First choice sys id - ' + response.results[0].record.getValue('sys_id'));\ngs.info('Second choice sys id - ' + response.results[1].record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nFirst choice sys id - 6bc0d3c03d0b9910f8776a598af912c6\nSecond choice sys id - 6fc0d3c03d0b9910f8776a598af912c9\n```\n\n## DecisionTableAPI - createAnswerElements\\(String decisionID, Array answerElements\\)\n\nCreates multiple records in the Result \\[sys\\_decision\\_multi\\_result\\_element\\] table that are related to the specified decision table.\n\n<table id=\"table_adc_lyg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\nanswerElements\n\n</td><td>\n\nArray\n\n</td><td>\n\nArray of objects used to create records in the Result Elements \\[sys\\_decision\\_multi\\_result\\_element\\] table. Each object creates one answer element record.```\n[\n   {\n      label: \"String\",\n      maxsize: Number,\n      order: Number,\n      reference: \"String\",\n      type: \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\nanswerElements.label\n\n</td><td>\n\nString\n\n</td><td>\n\nLabel of the answer element record.\n\n</td></tr><tr><td>\n\nanswerElements.maxsize\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Maximum number of characters allowed in the answer element field.Use this property only if **answerElements.type** is `String`.\n\n Default value: 250\n\n</td></tr><tr><td>\n\nanswerElements.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Order of the answer element.\n\n</td></tr><tr><td>\n\nanswerElements.reference\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired if the value of **answerElements.type** is `Reference`. Name of the reference table used by the answer element.\n\n</td></tr><tr><td>\n\nanswerElements.type\n\n</td><td>\n\nString\n\n</td><td>\n\nAnswer element input type.Valid values:\n\n-   Boolean\n-   Choice\n-   Currency\n-   Decimal\n-   Due\\_date\n-   [Glide\\_date](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_GlideDateScopedAPI.md)\n-   [Glide\\_date\\_time](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_GlideDateTimeScoped.md)\n-   [Glide\\_duration](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/c_GlideDurationScopedAPI.md)\n-   Integer\n-   Longint\n-   Reference\n-   String\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nObject with information about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"results\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results\n\n</td><td>\n\nArray with information about the status of each answer element.Data type: Array\n\n ```\n\"results\": [\n   {\n      \"errors\": [Array],\n      \"record\": GlideRecord,\n      \"status\": \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors\n\n</td><td>\n\nError information for the answer element.Data type: Array\n\n ```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.message\n\n</td><td>\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.type\n\n</td><td>\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.record\n\n</td><td>\n\nGlideRecord reference to the answer element created in the Result Elements \\[sys\\_decision\\_multi\\_result\\_element\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.status\n\n</td><td>\n\nStatus that indicates whether the answer element record was successfully created.Possible values:\n\n-   Failure\n-   Success\n\n Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example creates two answer elements for a decision table.\n\n```\nvar decisionID = 'a45be18c3d839910f8776a598af91269';\nvar answerElements = [\n   {\n      label: 'City name',\n      name: 'city',\n      type: 'choice',\n      comments: 'City name',\n   },\n   { \n      label: 'Assigned To', \n      name: 'assigned_to',\n      type: 'reference',\n      reference: 'sys_user'\n   }\n];\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.createAnswerElements(decisionID, answerElements);\ngs.info('Status - ' + response.status);\ngs.info('First answer element sys id - ' + response.results[0].record.getValue('sys_id'));\ngs.info('Second answer element sys id - ' + response.results[1].record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nFirst answer element sys id - 41c707803d0b9910f8776a598af91201\nSecond answer element sys id - 51c707803d0b9910f8776a598af91217\n```\n\n## DecisionTableAPI - createConditions\\(String decisionID, Array conditions\\)\n\nCreates multiple records in the Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\] table that are related to the specified decision table.\n\n<table id=\"table_cqq_fyg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\nconditions\n\n</td><td>\n\nArray\n\n</td><td>\n\nArray of objects used to create records in the Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\] table. Each object creates one decision condition record.```\n[\n  { \n    \"decisionInput\": \"String\",        \n    \"defaultOperator\": \"String\",\n    \"label\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nconditions.decisionInput\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision input to associate with the condition. Table: Decision Inputs \\[sys\\_decision\\_input\\]\n\n</td></tr><tr><td>\n\nconditions.defaultOperator\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Default operator for the condition. For a list of valid operators, see [Operators available for filters and queries](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/r_OpAvailableFiltersQueries.md).\n\n</td></tr><tr><td>\n\nconditions.label\n\n</td><td>\n\nString\n\n</td><td>\n\nLabel of the decision condition record.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nObject with information about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"results\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results\n\n</td><td>\n\nArray with information about the status of each decision condition.Data type: Array of Objects\n\n```\n\"results\": [\n  {\n    \"errors\": [Array],\n    \"record\": GlideRecord,\n    \"status\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors\n\n</td><td>\n\nError information for the decision condition.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.message\n\n</td><td>\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.type\n\n</td><td>\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.record\n\n</td><td>\n\nGlideRecord reference to the decision condition created in the Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.status\n\n</td><td>\n\nStatus that indicates whether the decision condition record was successfully created.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example creates two decision conditions for a decision table.\n\n```\nvar decisionID = 'a45be18c3d839910f8776a598af91269';\nvar conditions = [\n    {\n        label: 'Total count',\n        decisionInput: '22bde5003dc39910f8776a598af91292',        \n        defaultOperator: '!='\n    },\n    {\n        label: 'Is Incident Active',\n        decisionInput: '6abde5003dc39910f8776a598af9127e',\n        default_operator: 'ISEMPTY',        \n        order: 10,\n        field: 'u_incident.active'\n    }\n];\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.createConditions(decisionID, conditions);\ngs.info('Status - ' + response.status);\ngs.info('First condition sys id - ' + response.results[0].record.getValue('sys_id'));\ngs.info('Second condition sys id - ' + response.results[1].record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nFirst condition sys id - c1530f4c3dc79910f8776a598af912ef\nSecond condition sys id - c9530f4c3dc79910f8776a598af912f1\n```\n\n## DecisionTableAPI - createDecisionTable\\(Object decisionTable\\)\n\nCreates a decision table record in the Decision Tables \\[sys\\_decision\\] table.\n\n<table id=\"table_os1_bgn_lvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionTable\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs of the field names and values to use to create a decision table record.```\n{\n  \"accessibleFrom\": \"String\",\n  \"name\": \"String\",\n  \"scope\": \"String\n}\n```\n\n</td></tr><tr><td>\n\ndecisionTable.accessibleFrom\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Scopes that have access to the decision table record.Valid values:\n\n-   package\\_private\n-   public\n\n</td></tr><tr><td>\n\ndecisionTable.name\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the decision table.\n\n</td></tr><tr><td>\n\ndecisionTable.scope\n\n</td><td>\n\nString\n\n</td><td>\n\nScope of the decision table record.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"record\": GlideRecord,\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.record\n\n</td><td>\n\nGlideRecord reference to the decision table created in the Decision Tables \\[sys\\_decision\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example creates an Emergency Change Policy decision table.\n\n```\nvar decisionTable = {\n    name: 'Emergency Change Policy',  \n    scope: 'global',\n    accessibleFrom: 'public'\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.createDecisionTable(decisionTable);\ngs.info('Status -' + response.status);\ngs.info('Decision Table sys id - ' + response.record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nDecision Table sys id - 665569083d839910f8776a598af91223\n```\n\n## DecisionTableAPI - createInputChoices\\(String decisionID, Array choices\\)\n\nCreates multiple records in the Choices \\[sys\\_choice\\] table that are linked to decision inputs.\n\n<table id=\"table_u5r_1zg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\nchoices\n\n</td><td>\n\nArray\n\n</td><td>\n\nArray of objects used to create records in the Choices \\[sys\\_choice\\] table. Each object creates one choice record.```\n[\n  {\n    \"inputID\": \"String\",\n    \"label\": \"String\",\n    \"order\": Number,\n    \"value\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nchoices.inputID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision input to associate with the choice.Table: Decision Inputs \\[sys\\_decision\\_input\\]\n\n</td></tr><tr><td>\n\nchoices.label\n\n</td><td>\n\nString\n\n</td><td>\n\nLabel of the choice.\n\n</td></tr><tr><td>\n\nchoices.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Order of the choice.\n\n</td></tr><tr><td>\n\nchoices.value\n\n</td><td>\n\nString\n\n</td><td>\n\nValue of the choice.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nObject with information about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"results\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results\n\n</td><td>\n\nArray with information about the status of each choice.Data type: Array of Objects\n\n```\n\"results\": [\n   {\n      \"errors\": [Array],\n      \"record\": GlideRecord,\n      \"status\": \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors\n\n</td><td>\n\nError information for the choice.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.message\n\n</td><td>\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.type\n\n</td><td>\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.record\n\n</td><td>\n\nGlideRecord reference to the choice created in the Choices \\[sys\\_choice\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.status\n\n</td><td>\n\nStatus that indicates whether the choice record was successfully created.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example creates two choices for a decision input.\n\n```\nvar decisionID = 'a45be18c3d839910f8776a598af91269';\nvar inputID = '4d1f8f083d0b9910f8776a598af91274';\nvar choices = [\n   {\n      label: 'Hyderabad',\n      value: 'hyd',\n      inputId: inputID,\n      order: 20\n   },\n   { \n      label: 'Mumbai', \n      value: 'mum',\n      inputId: inputID,\n      order: 40\n   }\n];\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.createInputChoices(decisionID, choices);\ngs.info(JSON.stringify(response));\ngs.info('Status - ' + response.status);\ngs.info('First choice sys id - ' + response.results[0].record.getValue('sys_id'));\ngs.info('Second choice sys id - ' + response.results[1].record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nFirst choice sys id - 6bc0d3c03d0b9910f8776a598af912c6\nSecond choice sys id - 6fc0d3c03d0b9910f8776a598af912c9\n```\n\n## DecisionTableAPI - createInputs\\(String decisionID, Array inputs\\)\n\nCreates multiple records in the Decision Inputs \\[sys\\_decision\\_input\\] table that are related to the specified decision table.\n\n<table id=\"table_rrm_zxg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\ninputs\n\n</td><td>\n\nArray\n\n</td><td>\n\nArray of objects used to create records in the Decision Input \\[sys\\_decision\\_input\\] table. Each object creates one decision input record.```\n[\n   {\n      label: \"String\",\n      maxsize: Number,\n      order: Number,\n      reference: \"String\",\n      type: \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\ninputs.label\n\n</td><td>\n\nString\n\n</td><td>\n\nLabel of the decision input record.\n\n</td></tr><tr><td>\n\ninputs.maxsize\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Maximum number of characters allowed in the input field.Use this property only if **inputs.type** is `String`.\n\n Default value: 250\n\n</td></tr><tr><td>\n\ninputs.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Order of the input.\n\n</td></tr><tr><td>\n\ninputs.reference\n\n</td><td>\n\nString\n\n</td><td>\n\nRequired if the value of **inputs.type** is `Reference`. Name of the reference table used by the decision input.\n\n</td></tr><tr><td>\n\ninputs.type\n\n</td><td>\n\nString\n\n</td><td>\n\nDecision input type.Valid values:\n\n-   String\n-   Integer\n-   True/False\n-   Choice\n-   Reference\n-   Date\n-   Date/Time\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nObject with information about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"results\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results\n\n</td><td>\n\nArray with information about the status of each decision input.Data type: Array\n\n ```\n\"results\": [\n   {\n      \"errors\": [Array],\n      \"record\": GlideRecord,\n      \"status\": \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors\n\n</td><td>\n\nError information for the decision input.Data type: Array\n\n ```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.message\n\n</td><td>\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.type\n\n</td><td>\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.record\n\n</td><td>\n\nGlideRecord reference to the decision input created in the Decision Inputs \\[sys\\_decision\\_input\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.status\n\n</td><td>\n\nStatus that indicates whether the decision input record was successfully created.Possible values:\n\n-   Failure\n-   Success\n\n Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example creates two inputs for a decision table.\n\n```\nvar decisionID = 'a45be18c3d839910f8776a598af91269';\nvar inputs = [\n   {\n      label: 'Incident',\n      type: 'reference',\n      reference: 'incident',\n      ref_qual: 'active=true^EQ' \n   },\n   {\n      label: 'Total count',\n      type: 'integer'\n   }\n];\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.createInputs(decisionID,inputs);\ngs.info('Status - ' + response.status);\ngs.info('First input id –' + response.results[0].record.getValue('sys_id'));\ngs.info('Second input id –' + response.results[1].record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nFirst input id - 5dbfa58c3d839910f8776a598af91219\nSecond input id - 95bfe1803dc39910f8776a598af912fa\n```\n\n## DecisionTableAPI - createQuestions\\(String decisionID, Array questions\\)\n\nCreates multiple records in the Decisions \\[sys\\_decision\\_question\\] table that are related to the specified decision table.\n\n<table id=\"table_ucd_qyg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\nquestions\n\n</td><td>\n\nArray\n\n</td><td>\n\nArray of objects used to create records in the Decisions \\[sys\\_decision\\_question\\] table. Each object creates one question record.```\n[\n  {\n    \"active\": Boolean,\n    \"answer\": [Array],\n    \"condition\": \"String\",\n    \"defaultAnswer\": Boolean,\n    \"order\": Number\n  }\n]\n```\n\n</td></tr><tr><td>\n\nquestions.active\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether the question record is active.Valid values:\n\n-   true: The question record is active.\n-   false: The question record isn't active.\n\n</td></tr><tr><td>\n\nquestions.answer\n\n</td><td>\n\nArray\n\n</td><td>\n\nList of possible answers to the question.For a single result table, the array can only have one object. For a multi-result table, the array can have multiple objects.\n\n```\n[\n  {\n    \"name\": \"String\",\n    \"value\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nquestions.answer.name\n\n</td><td>\n\nString\n\n</td><td>\n\nName of the answer element. Table: Result \\[sys\\_decision\\_multi\\_result\\_element\\]\n\n</td></tr><tr><td>\n\nquestions.answer.value\n\n</td><td>\n\nString\n\n</td><td>\n\nValue of the answer element.Table: Result \\[sys\\_decision\\_multi\\_result\\_element\\]\n\n</td></tr><tr><td>\n\nquestions.condition\n\n</td><td>\n\nString\n\n</td><td>\n\nConditions required to reach this question.The fields available for the conditions are the decision inputs that are associated with the decision table.\n\nFor more information about creating conditions, see [Operators available for filters and queries](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/r_OpAvailableFiltersQueries.md).\n\n</td></tr><tr><td>\n\nquestions.defaultAnswer\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nFlag that indicates whether this question is the default question for the decision table.Valid values:\n\n-   true: The question is the default question.\n-   false: The question isn't the default question.\n\n</td></tr><tr><td>\n\nquestions.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOrder of the question.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nObject with information about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"results\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results\n\n</td><td>\n\nArray with information about the status of each question.Data type: Array of Objects\n\n```\n\"results\": [\n   {\n      \"errors\": [Array],\n      \"record\": GlideRecord,\n      \"status\": \"String\"\n   }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors\n\n</td><td>\n\nError information for the question.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.message\n\n</td><td>\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.errors.type\n\n</td><td>\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.record\n\n</td><td>\n\nGlideRecord reference to the question created in the Decisions \\[sys\\_decision\\_question\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.results.status\n\n</td><td>\n\nStatus that indicates whether the question record was successfully created.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example creates two questions for a decision table.\n\n```\nvar decisionID = 'a45be18c3d839910f8776a598af91269';\nvar questions = [\n   {\n      condition: 'u_item=Phone^u_price=500^EQ',\n      answer:[\n         {\n            name: 'u_seller',\n            value: '02826bf03710200044e0bfc8bcbe5d64'\n         },\n         {\n            name: 'u_discount',\n            value: '5'\n         }\n      ],\n      active: true,\n      defaultAnswer: true,\n      order: 300\n   },\n   {\n      condition: 'u_item=Laptop^u_price>800^EQ',\n      answer:[ \n         {\n            name: 'u_discount',\n            value: '20'\n         }\n      ],\n      active: true,\n      defaultAnswer: false,\n      order: 150\n   }\n];\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.createQuestions(decisionID, questions);\ngs.info(JSON.stringify(response));\ngs.info('Status - ' + response.status);\ngs.info('First decision sys id - ' + response.results[0].record.getValue('sys_id'));\ngs.info('Second decision sys id - ' + response.results[1].record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nFirst decision sys id - 21c8d3003d4b9910f8776a598af91213\nSecond decision sys id - e9c8d3003d4b9910f8776a598af91218\n```\n\n## DecisionTableAPI - deleteAnswerElement\\(String answerElementID\\)\n\nDeletes a record in the Result \\[sys\\_decision\\_multi\\_result\\_element\\] table.\n\n<table id=\"table_bkq_4yg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nanswerElementID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the answer element record.Table: Result Elements \\[sys\\_decision\\_multi\\_result\\_element\\]\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example deletes an answer element.\n\n```\nvar answerElementID = '51c707803d0b9910f8776a598af91217';\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.deleteAnswerElement(answerElementID);\ngs.info('Status - ' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n## DecisionTableAPI - deleteChoice\\(String choiceID\\)\n\nDeletes a record in the Choices \\[sys\\_choice\\] table.\n\n<table id=\"table_yzy_szg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchoiceID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the choice record. Table: Choices \\[sys\\_choice\\]\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example deletes a choice.\n\n```\nvar choiceID = '4532db883d0b9910f8776a598af912e7';\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.deleteChoice(choiceID);\ngs.info('Status - ' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n## DecisionTableAPI - deleteCondition\\(String conditionID\\)\n\nDeletes a record in the Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\] table.\n\n<table id=\"table_apn_3yg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nconditionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision condition record. Table: Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\]\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example deletes a decision condition.\n\n```\nvar conditionID = 'c9530f4c3dc79910f8776a598af912f1';\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.deleteCondition(conditionID);\ngs.info('Status - ' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n## DecisionTableAPI - deleteDecisionTable\\(String decisionID\\)\n\nDeletes a record in the Decision Tables \\[sys\\_decision\\] table.\n\n<table id=\"table_y3r_xxg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example deletes a decision table.\n\n```\nvar decisionID = 'a1f6e14c3d039910f8776a598af9129d';\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.deleteDecisionTable(decisionID);\ngs.info('Status -' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n## DecisionTableAPI - deleteInput\\(String inputID\\)\n\nDeletes a record in the Decision Inputs \\[sys\\_decision\\_input\\] table.\n\n<table id=\"table_lql_pdd_rvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ninputID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision input record.Table: Decision Inputs \\[sys\\_decision\\_input\\]\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example deletes a decision input.\n\n```\nvar inputID = 'a1f6e14c3d039910f8776a598af9129d';\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.deleteInput(inputID);\ngs.info('Status -' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n## DecisionTableAPI - deleteQuestion\\(String questionID\\)\n\nDeletes a record in the Decisions \\[sys\\_decision\\_question\\] table.\n\n<table id=\"table_wbw_vyg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nquestionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the question record.Table: Decisions \\[sys\\_decision\\_question\\]\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example deletes a question.\n\n```\nvar questionId = '700602fe81d21110f87735acbca2c610';\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.deleteQuestion(questionId);\ngs.info('Status - ' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n## DecisionTableAPI - getAll\\(\\)\n\nReturns all decision tables from the Decision Tables \\[sys\\_decision\\] table.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n<table id=\"table_y44_ktc_hhb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nAll decision tables and their fields from the Decision Tables \\[sys\\_decision\\] table. Each decision table contains these key-value pairs: -   distinctAnswers: Array. Answer records associated with the decision table. Each record contains these key-value pairs.\n    -   answerElementValues: Array. Answer element values associated with the answer record. Each record contains these key-value pairs:\n        -   answerElementName: String. Name of the answer element.\n        -   label: String. Answer record label.\n        -   table: String. Table of the answer element if the answer element is a Reference type.\n        -   type: String. Type of the answer element.\n        -   valid: Boolean. True if the record exists in the system; otherwise false.\n        -   value: String. Value of the answer element.\n    -   label: String. Answer record label.\n    -   multipleAnswerRecord: Boolean. True if this is a multiple answer record; otherwise false.\n    -   valid: Boolean. True if the record exists in the system; otherwise false.\n    -   value: String. Sys\\_id of the answer record.\n    -   table: String. Table containing the answer record.\n-   referenceQualifier: String. Used for internal purposes.\n-   inputs: Array. Decision inputs from the Decision Inputs \\[sys\\_decision\\_input\\] table associated with the decision table. Each record contains these key-value pairs.\n    -   searchField: String. Used for internal purposes.\n    -   defaultValue: String. Default value for the input.\n    -   show\\_ref\\_finder: Boolean. Used for internal purposes.\n    -   use\\_dependent: Boolean. Used for internal purposes.\n    -   type: String. Input data type.\n    -   mandatory: Boolean. True if the input is mandatory; otherwise false.\n    -   extended: Boolean. True if the input extends another field; otherwise false.\n    -   local: Boolean. Used for internal purposes.\n    -   sys\\_class\\_name: String. Used for internal purposes.\n    -   reference: String. Reference table used if the input type is reference.\n    -   dependent\\_on: String. Field that document ID and choice inputs depend on.\n    -   data\\_structure: String. Used for internal purposes.\n    -   readonly: Boolean. True if the input is read-only; otherwise false.\n    -   id: String. Sys\\_id of the input from the Decision Inputs \\[sys\\_decision\\_input\\] table.\n    -   type\\_label: String. Input data type label.\n    -   table: String. Reference field table if the input type is reference.\n    -   order: Number. Order in which the system evaluates inputs.\n    -   ref\\_qual: String. Condition applied to the reference table.\n    -   reference\\_display: String. Used for internal purposes.\n    -   choiceOption: String. Method for users to see a list of suggested values.\n    -   label: String. Label of the input record.\n    -   hint: String. Hint text used to help users understand the input required.\n    -   name: String. Internal name of the input record.\n    -   attributes: Array. Field attributes that apply to the input record.\n    -   maxsize: Number. Maximum number of characters allowed in the field.\n    -   columnName: String. Name of the input.\n-   answerElements: Array. Answer elements from the Answer elements \\[sys\\_decision\\_multi\\_result\\_element\\] table associated with the decision table. Each record contains these key-value pairs.\n    -   searchField: String. Used for internal purposes.\n    -   defaultValue: String. Default value for the answer element.\n    -   show\\_ref\\_finder: Boolean. Used for internal purposes.\n    -   use\\_dependent: Boolean. Used for internal purposes.\n    -   type: String. Answer element data type.\n    -   mandatory: Boolean. True if the answer element is mandatory; otherwise false.\n    -   extended: Boolean. True if the answer element extends another field; otherwise false.\n    -   local: Boolean. Used for internal purposes.\n    -   sys\\_class\\_name: String. Used for internal purposes.\n    -   reference: String. Reference table used if the answer element type is reference.\n    -   dependent\\_on: String. Field that document ID and choice answer elements depend on.\n    -   data\\_structure: String. Used for internal purposes.\n    -   readonly: Boolean. True if the input is read-only; otherwise false.\n    -   id: String. Sys\\_id of the input from the Answer elements \\[sys\\_decision\\_multi\\_result\\_element\\] table.\n    -   type\\_label: String. Answer element data type label.\n    -   table: String. Reference field table if the answer element type is reference.\n    -   order: Number. Order of the answer elements.\n    -   ref\\_qual: String. Condition applied to the reference table.\n    -   reference\\_display: String. Used for internal purposes.\n    -   comments: Description of the answer element.\n    -   choiceOption: String. Method for users to see a list of suggested values.\n    -   label: String. Label of the answer element record.\n    -   hint: String. Hint text used to help users understand the answer element required.\n    -   name: String. Internal name of the answer element record.\n    -   attributes: Array. Field attributes that apply to the answer element record.\n    -   maxsize: Number. Maximum number of characters allowed in the field.\n    -   columnName: String. Name of the answer element.\n-   domain: String. Domain in which the decision table is visible.\n-   answerType: String. Used for internal purposes.\n-   questions: Array. Decision records from the Decision \\[sys\\_decision\\_question\\] table associated with the decision table. Decision records contain these key-value pairs.\n    -   defaultAnswer: Boolean. True if this decision is the default for the decision table; otherwise false.\n    -   condition: String. Conditions required to reach this decision. The fields available for the condition are the decision inputs that are associated with this decision table.\n    -   answer: Object. Answer record associated with the decision. Answer objects contain these key-value pairs.\n        -   answerElementValues: Array. Answer element values associated with the answer record. Each record contains these key-value pairs:\n            -   answerElementName: String. Name of the answer element.\n            -   label: String. Answer record label.\n            -   table: String. Table of the answer element if the answer element is a Reference type.\n            -   type: String. Type of the answer element.\n            -   valid: Boolean. True if the record exists in the system; otherwise false.\n            -   value: String. Value of the answer element.\n        -   label: String. Answer record label.\n        -   multipleAnswerRecord: Boolean. True if this is a multiple answer record; otherwise false.\n        -   valid: Boolean. True if the record exists in the system; otherwise false.\n        -   value: String. Sys\\_id of the answer record.\n        -   table: String. Table containing the answer record.\n    -   decisionTable: String. Sys\\_id of the decision table from the Decision Tables \\[sys\\_decision\\] table associated with the decision.\n    -   domain: String. Domain in which the decision is visible.\n    -   active: Boolean. True if the decision record is active; otherwise false.\n    -   id: String. Sys\\_id of the decision record from the Decision \\[sys\\_decision\\_question\\] table.\n    -   label: String. Label for the decision record.\n    -   order: Number. Order in which the system evaluates decisions.\n-   accessibleFrom: String. Scopes that have access to the record.\n-   name: String. Internal name of the decision table record.\n-   active: Boolean. True if the decision table record is active; otherwise false.\n-   multipleAnswerSupported: Boolean. True if the decision table support multiple answers; otherwise false.\n-   id: String. Sys\\_id of the decision table record.\n-   label: String. Label of the decision table record.\n-   answerTable: Object. Answer table associated with the decision table.\n    -   displayValue: String. Display name of the table that contains answer records.\n    -   value: String. Internal name of the table that contains answer records.\n-   conditions: Array. Conditions in the Decision \\[sys\\_decision\\_question\\_list\\] table. Applicable only for decision tables created or edited in Decision Builder. Each entry contains the following key value pairs.\n    -   decisionInput: String. Sys\\_id of the corresponding decision input. Listed in the Decision Inputs \\[sys\\_decision\\_input\\] table.\n    -   sysId: String. Sys\\_id of the condition record.\n    -   defaultOperator: String. Default operator for the condition.\n    -   typeName: String. Name of the condition type.\n    -   description: String. Description of the condition.\n    -   label: String. Label of the condition.\n    -   type: String. Sys\\_id of the condition type.\n    -   reference: String. Reference table used if the condition type is reference.\n    -   field: String. Field of the condition if the condition is dot-walked from an input of type reference.\n    -   decisionTable: String. Sys\\_id of the decision table from the Decision Tables \\[sys\\_decision\\] table.\n    -   fieldLabel: String. Field label of the condition if the condition is dot-walked from an input of type reference.\n    -   scope: String. Scope of the condition.\n    -   domain: String. Domain in which the condition is visible.\n    -   typeLabel: String. Label of the condition type.\n    -   fieldParentTable: Table name of the condition field. Value returns if the condition is dot-walked to a non-reference field from a reference input.\n    -   order: Number. Order of the condition.\n\n Format: JSON\n\n</td></tr></tbody>\n</table>```\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.getAll();\ngs.info(JSON.stringify(response));\n```\n\nOutput:\n\n```\n{\"result\": [\n  {\n    \"distinctAnswers\": [{\n      \"valid\": true,\n      \"label\": \"Assignment Group Manager Approval\",\n      \"value\": \"5684821db701230034d1da23ee11a94d\",\n      \"table\": \"chg_approval_def\"\n    }],\n    \"referenceQualifier\": \"\",\n    \"inputs\": [\n      {\n        \"searchField\": null,\n        \"defaultValue\": \"0\",\n        \"show_ref_finder\": false,\n        \"use_dependent\": false,\n        \"type\": \"integer\",\n        \"mandatory\": false,\n        \"extended\": false,\n        \"local\": false,\n        \"sys_class_name\": \"\",\n        \"reference\": \"\",\n        \"dependent_on\": \"\",\n        \"data_structure\": \"\",\n        \"readonly\": false,\n        \"id\": \"eca52ca7b701230034d1da23ee11a95a\",\n        \"type_label\": \"Integer\",\n        \"table\": \"\",\n        \"order\": 100,\n        \"ref_qual\": \"\",\n        \"reference_display\": \"\",\n        \"choiceOption\": \"\",\n        \"label\": \"CI Count\",\n        \"hint\": \"\",\n        \"name\": \"ci_count\",\n        \"attributes\": {\"element_mapping_provider\": \"com.glide.decision_table.data.DecisionTableVariableMapper\"},\n        \"maxsize\": 40,\n        \"columnName\": \"\"\n      },\n      {\n        \"searchField\": \"number\",\n        \"defaultValue\": \"\",\n        \"show_ref_finder\": false,\n        \"use_dependent\": false,\n        \"type\": \"reference\",\n        \"mandatory\": false,\n        \"extended\": false,\n        \"local\": false,\n        \"sys_class_name\": \"\",\n        \"reference\": \"change_request\",\n        \"dependent_on\": \"\",\n        \"data_structure\": \"\",\n        \"readonly\": false,\n        \"id\": \"1395e8a7b701230034d1da23ee11a9b6\",\n        \"type_label\": \"Reference\",\n        \"table\": \"\",\n        \"order\": 100,\n        \"ref_qual\": \"\",\n        \"reference_display\": \"Change Request\",\n        \"choiceOption\": \"\",\n        \"label\": \"Change request\",\n        \"hint\": \"\",\n        \"name\": \"change_request\",\n        \"attributes\": {\"element_mapping_provider\": \"com.glide.decision_table.data.DecisionTableVariableMapper\"},\n        \"maxsize\": 32,\n        \"columnName\": \"\"\n      }\n    ],\n    \"domain\": \"global\",\n    \"answerType\": \"reference\",\n    \"questions\": [{\n      \"defaultAnswer\": false,\n      \"condition\": \"ci_count>=1000^EQ\",\n      \"answer\": {\n        \"valid\": true,\n        \"label\": \"Assignment Group Manager Approval\",\n        \"value\": \"5684821db701230034d1da23ee11a94d\",\n        \"table\": \"chg_approval_def\"\n      },\n      \"decisionTable\": \"e49568a7b701230034d1da23ee11a913\",\n      \"domain\": \"global\",\n      \"active\": true,\n      \"state\": null,\n      \"id\": \"2a36eca7b701230034d1da23ee11a961\",\n      \"label\": \"Mandatory Approval if 1000 CIs or more\",\n      \"order\": 0\n    }],\n    \"accessibleFrom\": \"public\",\n    \"name\": \"Example Standard Change Policy\",\n    \"active\": true,\n    \"id\": \"e49568a7b701230034d1da23ee11a913\",\n    \"label\": \"\",\n    \"answerTable\": {\n      \"displayValue\": \"Change Approval Definition\",\n      \"value\": \"chg_approval_def\"\n    }\n  },\n  {\n    \"distinctAnswers\": [\n      {\n        \"valid\": true,\n        \"label\": \"CAB Approval\",\n        \"value\": \"45358a5db701230034d1da23ee11a938\",\n        \"table\": \"chg_approval_def\"\n      },\n      {\n        \"valid\": true,\n        \"label\": \"Assignment Group Manager Approval\",\n        \"value\": \"5684821db701230034d1da23ee11a94d\",\n        \"table\": \"chg_approval_def\"\n      },\n      {\n        \"valid\": true,\n        \"label\": \"Assignment Group Approval\",\n        \"value\": \"dc95ca5db701230034d1da23ee11a9e9\",\n        \"table\": \"chg_approval_def\"\n      }\n    ],\n    \"referenceQualifier\": \"\",\n    \"inputs\": [\n      {\n        \"searchField\": null,\n        \"defaultValue\": \"false\",\n        \"show_ref_finder\": false,\n        \"use_dependent\": false,\n        \"type\": \"boolean\",\n        \"mandatory\": false,\n        \"extended\": false,\n        \"local\": false,\n        \"sys_class_name\": \"\",\n        \"reference\": \"\",\n        \"dependent_on\": \"\",\n        \"data_structure\": \"\",\n        \"readonly\": false,\n        \"id\": \"c0a7869db701230034d1da23ee11a9e7\",\n        \"type_label\": \"True/False\",\n        \"table\": \"\",\n        \"order\": 100,\n        \"ref_qual\": \"\",\n        \"reference_display\": \"\",\n        \"choiceOption\": \"\",\n        \"label\": \"Manager approved\",\n        \"hint\": \"\",\n        \"name\": \"manager_approved\",\n        \"attributes\": {\"element_mapping_provider\": \"com.glide.decision_table.data.DecisionTableVariableMapper\"},\n        \"maxsize\": 40,\n        \"columnName\": \"\"\n      },\n      {\n        \"searchField\": \"number\",\n        \"defaultValue\": \"\",\n        \"show_ref_finder\": false,\n        \"use_dependent\": false,\n        \"type\": \"reference\",\n        \"mandatory\": false,\n        \"extended\": false,\n        \"local\": false,\n        \"sys_class_name\": \"\",\n        \"reference\": \"change_request\",\n        \"dependent_on\": \"\",\n        \"data_structure\": \"\",\n        \"readonly\": false,\n        \"id\": \"23164e5db701230034d1da23ee11a9c5\",\n        \"type_label\": \"Reference\",\n        \"table\": \"\",\n        \"order\": 100,\n        \"ref_qual\": \"\",\n        \"reference_display\": \"Change Request\",\n        \"choiceOption\": \"\",\n        \"label\": \"Change request\",\n        \"hint\": \"\",\n        \"name\": \"change_request\",\n        \"attributes\": {\"element_mapping_provider\": \"com.glide.decision_table.data.DecisionTableVariableMapper\"},\n        \"maxsize\": 32,\n        \"columnName\": \"\"\n      }\n    ],\n    \"domain\": \"global\",\n    \"answerType\": \"reference\",\n    \"questions\": [\n      {\n        \"defaultAnswer\": false,\n        \"condition\": \"change_request.state=-3^change_request.riskIN2,3^NQchange_request.state=-3^change_request.assignment_group.managerISEMPTY^EQ\",\n        \"answer\": {\n          \"valid\": true,\n          \"label\": \"CAB Approval\",\n          \"value\": \"45358a5db701230034d1da23ee11a938\",\n          \"table\": \"chg_approval_def\"\n        },\n        \"decisionTable\": \"5b06ce5db701230034d1da23ee11a965\",\n        \"domain\": \"global\",\n        \"active\": true,\n        \"state\": null,\n        \"id\": \"10284a9db701230034d1da23ee11a9c1\",\n        \"label\": \"Requires CAB Approval\",\n        \"order\": 0\n      },\n      {\n        \"defaultAnswer\": false,\n        \"condition\": \"change_request.state=-3^change_request.risk=4^manager_approved=false^EQ\",\n        \"answer\": {\n          \"valid\": true,\n          \"label\": \"Assignment Group Manager Approval\",\n          \"value\": \"5684821db701230034d1da23ee11a94d\",\n          \"table\": \"chg_approval_def\"\n        },\n        \"decisionTable\": \"5b06ce5db701230034d1da23ee11a965\",\n        \"domain\": \"global\",\n        \"active\": true,\n        \"state\": null,\n        \"id\": \"88e6829db701230034d1da23ee11a9a9\",\n        \"label\": \"Low Risk Manager approval\",\n        \"order\": 0\n      },\n      {\n        \"defaultAnswer\": false,\n        \"condition\": \"change_request.state=-4^EQ\",\n        \"answer\": {\n          \"valid\": true,\n          \"label\": \"Assignment Group Approval\",\n          \"value\": \"dc95ca5db701230034d1da23ee11a9e9\",\n          \"table\": \"chg_approval_def\"\n        },\n        \"decisionTable\": \"5b06ce5db701230034d1da23ee11a965\",\n        \"domain\": \"global\",\n        \"active\": true,\n        \"state\": null,\n        \"id\": \"a436029db701230034d1da23ee11a989\",\n        \"label\": \"Assess Technical Approvals\",\n        \"order\": 0\n      }\n    ],\n    \"accessibleFrom\": \"public\",\n    \"name\": \"Normal Change Policy\",\n    \"active\": true,\n    \"id\": \"5b06ce5db701230034d1da23ee11a965\",\n    \"label\": \"\",\n    \"answerTable\": {\n      \"displayValue\": \"Change Approval Definition\",\n      \"value\": \"chg_approval_def\"\n    }\n  },\n \n]}\n```\n\n## DecisionTableAPI - getAnswers\\(String decisionID\\)\n\nReturns the answers associated with the specified decision table. An answer is a record on any table associated with a Decision \\[sys\\_decision\\_question\\] record.\n\n|Name|Type|Description|\n|----|----|-----------|\n|decisionID|String|Sys\\_id of the Decision Table record from the Decision Tables \\[sys\\_decision\\] table.|\n\n<table id=\"table_phm_m5c_hhb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nAnswer records associated with the decision table. Each record contains these key-value pairs: -   answerElementValues: Array. Answer element values associated with the answer record. Each record contains these key-value pairs:\n    -   answerElementName: String. Name of the answer element.\n    -   label: String. Answer record label.\n    -   table: String. Table of the answer element if the answer element is a Reference type.\n    -   type: String. Type of the answer element.\n    -   valid: Boolean. True if the record exists in the system; otherwise false.\n    -   value: String. Value of the answer element.\n-   label: String. Answer record label.\n-   multipleAnswerRecord: Boolean. True if this is a multiple answer record; otherwise false.\n-   valid: Boolean. True if the record exists in the system; otherwise false.\n-   value: String. Sys\\_id of the answer record.\n-   table: String. Table containing the answer record.\n\n Format: JSON\n\n</td></tr></tbody>\n</table>```\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.getAnswers(\"3c4464a7b701230034d1da23ee11a993\");\ngs.info(JSON.stringify(response));\n```\n\nOutput:\n\n```\n{\n \"result\": [\n  {\n   \"answerElementValues\": [\n    {\n     \"valid\": true,\n     \"answerElementName\": \"u_user\",\n     \"label\": \"Abel Tuter\",\n     \"value\": \"62826bf03710200044e0bfc8bcbe5df1\",\n     \"table\": \"sys_user\"\n   }],\n  \"valid\": true,\n  \"multipleAnswerRecord\": true,\n  \"label\": \"User: Abel Tuter\",\n  \"value\": \"76e19cd953d7011097a3ddeeff7b122c\",\n  \"table\": \"sys_decision_multi_result\"\n  },\n ]\n}\n```\n\n## DecisionTableAPI - getDecision\\(String decisionID, Map inputs\\)\n\nEvaluates a decision table based on the provided inputs and returns an answer. If no inputs are provided, returns the first default answer found.\n\n### Input and condition behavior\n\nWhen `getDecision()` executes, the Decision Table engine evaluates the provided input values against the configured conditions and returns the matching result rows.\n\nFor inputs of type Date / Time, values must be provided in the internal ServiceNow datetime format:\n\n```\nyyyy-MM-dd HH:mm:ss\n\n```\n\nThe system evaluates Date / Time values as absolute date-time values. The system doesn't apply time zone information during evaluation.\n\n### Between operator behavior for Date / Time inputs\n\nWhen a condition uses the between operator with a Date / Time input, the system compares the input value directly to the configured start and end values.\n\nThe comparison:\n\n-   Uses the literal datetime values provided\n-   Ignores user, system, or session timezone adjustments\n-   Evaluates boundary values exactly as the condition defines them\n\nScript example to normalize inputs to UTC before running `getDecision()`:\n\n```\n// Normalize a user-provided datetime to UTC before calling getDecision()\nvar gdt = new GlideDateTime();\ngdt.setDisplayValue(\"2025-04-07 09:00:00\"); // user-local display value\n\nvar inputs = {\n    effective_time: gdt.getValue() // UTC value: yyyy-MM-dd HH:mm:ss\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar result = dt.getDecision(\"my_decision_table\", inputs);\n```\n\n<table id=\"table_e3m_w5c_hhb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the Decision Table record from the Decision Tables \\[sys\\_decision\\] table.\n\n</td></tr><tr><td>\n\ninputs\n\n</td><td>\n\nMap\n\n</td><td>\n\nOptional. Input values for the Decision Inputs \\[sys\\_decision\\_input\\] table associated with the provided decision table. Use the value of the **Column name** field as the key. The data type of the value must match the Decision Input **Type** field. If no inputs are provided, returns the first default answer found.**Note:** All inputs and column names must follow the following format:\n\n-   be all lower case and prefixed with a `u_`\n-   blank spaces are replaced with `_`\n\nFor example,\n\n-   Input name: Incident\n-   Input technical name: u\\_incident\n-   Result column name: Assignment Group\n-   Result column technical name: u\\_assignment\\_group\n\nFor more information, see [Make Decisions from JavaScript with the DecisionTableAPI - Workflow Automation CoE](https://www.servicenow.com/community/workflow-automation-articles/make-decisions-from-javascript-with-the-decisiontableapi/ta-p/2620035)\n\n</td></tr></tbody>\n</table><table id=\"table_f3m_w5c_hhb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nGlideRecord\n\n</td><td>\n\nThe correctly evaluated Answer record associated with the decision table. An answer record is a record from the table defined in the Decision \\[sys\\_decision\\_question\\] record **Answer table** field. -   If no inputs are provided, returns the first default answer found. If no default or correctly evaluated answers are found, returns an error.\n-   If the decision table supports multiple answers, each answer is listed in the **result\\_elements** field.\n\n</td></tr></tbody>\n</table>```\nvar dt = new sn_dt.DecisionTableAPI();\nvar inputs = new Object();\ninputs['u_age'] = 25;\nvar response = dt.getDecision('26eea7a9dba07300efc65404ce961961', inputs);\nvar user = response.result_elements.u_user;\n```\n\n## DecisionTableAPI - getDecisions\\(String decisionID, Map inputs\\)\n\nEvaluates a decision table based on the provided inputs and returns all correctly evaluated answers. If no inputs are provided, returns all default answers.\n\n### Input and condition behavior\n\nWhen `getDecision()` executes, the Decision Table engine evaluates the provided input values against the configured conditions and returns the matching result rows.\n\nFor inputs of type Date / Time, values must be provided in the internal ServiceNow datetime format:\n\n```\nyyyy-MM-dd HH:mm:ss\n\n```\n\nThe system evaluates Date / Time values as absolute date-time values. The system doesn't apply time zone information during evaluation.\n\n### Between operator behavior for Date / Time inputs\n\nWhen a condition uses the between operator with a Date / Time input, the system compares the input value directly to the configured start and end values.\n\nThe comparison:\n\n-   Uses the literal datetime values provided\n-   Ignores user, system, or session timezone adjustments\n-   Evaluates boundary values exactly as the condition defines them\n\nScript example to normalize inputs to UTC before running `getDecision()`:\n\n```\n// Normalize a user-provided datetime to UTC before calling getDecision()\nvar gdt = new GlideDateTime();\ngdt.setDisplayValue(\"2025-04-07 09:00:00\"); // user-local display value\n\nvar inputs = {\n    effective_time: gdt.getValue() // UTC value: yyyy-MM-dd HH:mm:ss\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar result = dt.getDecision(\"my_decision_table\", inputs);\n```\n\n<table id=\"table_e3m_w5c_hhb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the Decision Table record from the Decision Tables \\[sys\\_decision\\] table.\n\n</td></tr><tr><td>\n\ninputs\n\n</td><td>\n\nMap\n\n</td><td>\n\nOptional. Input values for the Decision Inputs \\[sys\\_decision\\_input\\] table associated with the decision table. If you provide no inputs, returns all default answers.**Note:** All inputs and column names must follow this format:\n\n-   Use all lowercase and prefix with u\\_\n-   Replace blank spaces with \\_\n\nFor example,\n\n-   Input name: Incident\n-   Input technical name: u\\_incident\n-   Result column name: Assignment Group\n-   Result column technical name: u\\_assignment\\_group\n\nFor more information, see [Make Decisions from JavaScript with the DecisionTableAPI - Workflow Automation CoE](https://www.servicenow.com/community/workflow-automation-articles/make-decisions-from-javascript-with-the-decisiontableapi/ta-p/2620035)\n\n</td></tr></tbody>\n</table><table id=\"table_tg2_y5c_hhb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nArray\n\n</td><td>\n\nList of answer records in GlideRecord format. An answer record is a record on any table associated with a Decision \\[sys\\_decision\\_question\\] record. -   If you provide no inputs, returns all default answers.\n-   If the system finds no default or correctly evaluated answers, returns an error.\n-   If the decision table supports multiple answers, the **result\\_elements** field lists each answer.\n\n</td></tr></tbody>\n</table>```\nvar dt = new sn_dt.DecisionTableAPI();\nvar input = new Object();\ninput['u_age'] = 25;\nvar response = dt.getDecisions('5b06ce5db701230034d1da23ee11a965', input);\nvar firstRecord = response[0];\nvar user = firstRecord.result_elements.u_user;\n```\n\n## DecisionTableAPI - getDecisionTable\\(String decisionID\\)\n\nReturns a single decision table from the Decision Tables \\[sys\\_decision\\] table.\n\n|Name|Type|Description|\n|----|----|-----------|\n|decisionID|String|Sys\\_id of the Decision Table record from the Decision Tables \\[sys\\_decision\\] table.|\n\n<table id=\"table_b3y_g5c_hhb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nDecision table from the Decision Tables \\[sys\\_decision\\] table. Each decision table contains these key-value pairs. -   distinctAnswers: Array. Answer records associated with the decision table. Each record contains these key-value pairs.\n    -   answerElementValues: Array. Answer element values associated with the answer record. Each record contains these key-value pairs:\n        -   answerElementName: String. Name of the answer element.\n        -   label: String. Answer record label.\n        -   table: String. Table of the answer element if the answer element is a Reference type.\n        -   type: String. Type of the answer element.\n        -   valid: Boolean. True if the record exists in the system; otherwise false.\n        -   value: String. Value of the answer element.\n    -   label: String. Answer record label.\n    -   multipleAnswerRecord: Boolean. True if this is a multiple answer record; otherwise false.\n    -   valid: Boolean. True if the record exists in the system; otherwise false.\n    -   value: String. Sys\\_id of the answer record.\n    -   table: String. Table containing the answer record.\n-   referenceQualifier: String. Used for internal purposes.\n-   inputs: Array. Decision inputs from the Decision Inputs \\[sys\\_decision\\_input\\] table associated with the decision table. Each record contains these key-value pairs.\n    -   searchField: String. Used for internal purposes.\n    -   defaultValue: String. Default value for the input.\n    -   show\\_ref\\_finder: Boolean. Used for internal purposes.\n    -   use\\_dependent: Boolean. Used for internal purposes.\n    -   type: String. Input data type.\n    -   mandatory: Boolean. True if the input is mandatory; otherwise false.\n    -   extended: Boolean. True if the input extends another field; otherwise false.\n    -   local: Boolean. Used for internal purposes.\n    -   sys\\_class\\_name: String. Used for internal purposes.\n    -   reference: String. Reference table used if the input type is reference.\n    -   dependent\\_on: String. Field that document ID and choice inputs depend on.\n    -   data\\_structure: String. Used for internal purposes.\n    -   readonly: Boolean. True if the input is read-only; otherwise false.\n    -   id: String. Sys\\_id of the input from the Decision Inputs \\[sys\\_decision\\_input\\] table.\n    -   type\\_label: String. Input data type label.\n    -   table: String. Reference field table if the input type is reference.\n    -   order: Number. Order in which the system evaluates inputs.\n    -   ref\\_qual: String. Condition applied to the reference table.\n    -   reference\\_display: String. Used for internal purposes.\n    -   choiceOption: String. Method for users to see a list of suggested values.\n    -   label: String. Label of the input record.\n    -   hint: String. Hint text used to help users understand the input required.\n    -   name: String. Internal name of the input record.\n    -   attributes: Array. Field attributes that apply to the input record.\n    -   maxsize: Number. Maximum number of characters allowed in the field.\n    -   columnName: String. Name of the input.\n-   answerElements: Array. Answer elements from the Answer elements \\[sys\\_decision\\_multi\\_result\\_element\\] table associated with the decision table. Each record contains these key-value pairs.\n    -   searchField: String. Used for internal purposes.\n    -   defaultValue: String. Default value for the answer element.\n    -   show\\_ref\\_finder: Boolean. Used for internal purposes.\n    -   use\\_dependent: Boolean. Used for internal purposes.\n    -   type: String. Answer element data type.\n    -   mandatory: Boolean. True if the answer element is mandatory; otherwise false.\n    -   extended: Boolean. True if the answer element extends another field; otherwise false.\n    -   local: Boolean. Used for internal purposes.\n    -   sys\\_class\\_name: String. Used for internal purposes.\n    -   reference: String. Reference table used if the answer element type is reference.\n    -   dependent\\_on: String. Field that document ID and choice answer elements depend on.\n    -   data\\_structure: String. Used for internal purposes.\n    -   readonly: Boolean. True if the input is read-only; otherwise false.\n    -   id: String. Sys\\_id of the input from the Answer elements \\[sys\\_decision\\_multi\\_result\\_element\\] table.\n    -   type\\_label: String. Answer element data type label.\n    -   table: String. Reference field table if the answer element type is reference.\n    -   order: Number. Order of the answer elements.\n    -   ref\\_qual: String. Condition applied to the reference table.\n    -   reference\\_display: String. Used for internal purposes.\n    -   comments: Description of the answer element.\n    -   choiceOption: String. Method for users to see a list of suggested values.\n    -   label: String. Label of the answer element record.\n    -   hint: String. Hint text used to help users understand the answer element required.\n    -   name: String. Internal name of the answer element record.\n    -   attributes: Array. Field attributes that apply to the answer element record.\n    -   maxsize: Number. Maximum number of characters allowed in the field.\n    -   columnName: String. Name of the answer element.\n-   domain: String. Domain in which the decision table is visible.\n-   answerType: String. Used for internal purposes.\n-   questions: Array. Decision records from the Decision \\[sys\\_decision\\_question\\] table associated with the decision table. Decision records contain these key-value pairs.\n    -   defaultAnswer: Boolean. True if this decision is the default for the decision table; otherwise false.\n    -   condition: String. Conditions required to reach this decision. The fields available for the condition are the decision inputs that are associated with this decision table.\n    -   answer: Object. Answer record associated with the decision. Answer objects contain these key-value pairs.\n        -   answerElementValues: Array. Answer element values associated with the answer record. Each record contains these key-value pairs:\n            -   answerElementName: String. Name of the answer element.\n            -   label: String. Answer record label.\n            -   table: String. Table of the answer element if the answer element is a Reference type.\n            -   type: String. Type of the answer element.\n            -   valid: Boolean. True if the record exists in the system; otherwise false.\n            -   value: String. Value of the answer element.\n        -   label: String. Answer record label.\n        -   multipleAnswerRecord: Boolean. True if this is a multiple answer record; otherwise false.\n        -   valid: Boolean. True if the record exists in the system; otherwise false.\n        -   value: String. Sys\\_id of the answer record.\n        -   table: String. Table containing the answer record.\n    -   decisionTable: String. Sys\\_id of the decision table from the Decision Tables \\[sys\\_decision\\] table associated with the decision.\n    -   domain: String. Domain in which the decision is visible.\n    -   active: Boolean. True if the decision record is active; otherwise false.\n    -   id: String. Sys\\_id of the decision record from the Decision \\[sys\\_decision\\_question\\] table.\n    -   label: String. Label for the decision record.\n    -   order: Number. Order in which the system evaluates decisions.\n-   accessibleFrom: String. Scopes that have access to the record.\n-   name: String. Internal name of the decision table record.\n-   active: Boolean. True if the decision table record is active; otherwise false.\n-   multipleAnswerSupported: Boolean. True if the decision table support multiple answers; otherwise false.\n-   id: String. Sys\\_id of the decision table record.\n-   label: String. Label of the decision table record.\n-   answerTable: Object. Answer table associated with the decision table.\n    -   displayValue: String. Display name of the table that contains answer records.\n    -   value: String. Internal name of the table that contains answer records.\n-   conditions: Array. Conditions in the Decision \\[sys\\_decision\\_question\\_list\\] table. Applicable only for decision tables created or edited in Decision Builder. Each entry contains the following key value pairs.\n    -   decisionInput: String. Sys\\_id of the corresponding decision input. Listed in the Decision Inputs \\[sys\\_decision\\_input\\] table.\n    -   sysId: String. Sys\\_id of the condition record.\n    -   defaultOperator: String. Default operator for the condition.\n    -   typeName: String. Name of the condition type.\n    -   description: String. Description of the condition.\n    -   label: String. Label of the condition.\n    -   type: String. Sys\\_id of the condition type.\n    -   reference: String. Reference table used if the condition type is reference.\n    -   field: String. Field of the condition if the condition is dot-walked from an input of type reference.\n    -   decisionTable: String. Sys\\_id of the decision table from the Decision Tables \\[sys\\_decision\\] table.\n    -   fieldLabel: String. Field label of the condition if the condition is dot-walked from an input of type reference.\n    -   scope: String. Scope of the condition.\n    -   domain: String. Domain in which the condition is visible.\n    -   typeLabel: String. Label of the condition type.\n    -   fieldParentTable: Table name of the condition field. Value returns if the condition is dot-walked to a non-reference field from a reference input.\n    -   order: Number. Order of the condition.\n\n Format: JSON\n\n</td></tr></tbody>\n</table>```\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.getDecisionTable(\"3c4464a7b701230034d1da23ee11a993\");\ngs.info(JSON.stringify(response));\n\n```\n\nOutput:\n\n```\n\"distinctAnswers\": [{\n    \"valid\": true,\n    \"label\": \"CAB Approval\",\n    \"value\": \"45358a5db701230034d1da23ee11a938\",\n    \"table\": \"chg_approval_def\"\n  }],\n  \"referenceQualifier\": \"\",\n  \"inputs\": [{\n    \"searchField\": \"number\",\n    \"defaultValue\": \"\",\n    \"show_ref_finder\": false,\n    \"use_dependent\": false,\n    \"type\": \"reference\",\n    \"mandatory\": false,\n    \"extended\": false,\n    \"local\": false,\n    \"sys_class_name\": \"\",\n    \"reference\": \"change_request\",\n    \"dependent_on\": \"\",\n    \"data_structure\": \"\",\n    \"readonly\": false,\n    \"id\": \"634420a7b701230034d1da23ee11a94f\",\n    \"type_label\": \"Reference\",\n    \"table\": \"\",\n    \"order\": 100,\n    \"ref_qual\": \"\",\n    \"reference_display\": \"Change Request\",\n    \"choiceOption\": \"\",\n    \"label\": \"Change request\",\n    \"hint\": \"\",\n    \"name\": \"change_request\",\n    \"attributes\": {\"element_mapping_provider\": \"com.glide.decision_table.data.DecisionTableVariableMapper\"},\n    \"maxsize\": 32,\n    \"columnName\": \"\"\n  }],\n  \"domain\": \"global\",\n  \"answerType\": \"reference\",\n  \"questions\": [{\n    \"defaultAnswer\": true,\n    \"condition\": \"change_request.state=-3^EQ\",\n    \"answer\": {\n      \"valid\": true,\n      \"label\": \"CAB Approval\",\n      \"value\": \"45358a5db701230034d1da23ee11a938\",\n      \"table\": \"chg_approval_def\"\n    },\n    \"decisionTable\": \"3c4464a7b701230034d1da23ee11a993\",\n    \"domain\": \"global\",\n    \"active\": true,\n    \"state\": null,\n    \"id\": \"2764a4a7b701230034d1da23ee11a989\",\n    \"label\": \"Requires CAB Approval\",\n    \"order\": 0\n  }],\n  \"accessibleFrom\": \"public\",\n  \"name\": \"Emergency Change Policy\",\n  \"active\": true,\n  \"id\": \"3c4464a7b701230034d1da23ee11a993\",\n  \"label\": \"\",\n  \"answerTable\": {\n    \"displayValue\": \"Change Approval Definition\",\n    \"value\": \"chg_approval_def\"\n  }\n}\n\n```\n\n## DecisionTableAPI - getInputs\\(String decisionID\\)\n\nReturns the decision inputs from the Decision Inputs \\[sys\\_decision\\_input\\] table associated with the passed in decision table.\n\n|Name|Type|Description|\n|----|----|-----------|\n|decisionID|String|Sys\\_id of the Decision Table record from the Decision Tables \\[sys\\_decision\\] table.|\n\n<table id=\"table_v5w_35c_hhb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nDecision inputs from the Decision Inputs \\[sys\\_decision\\_input\\] table associated with the decision table. You can find the inputs associated with a decision table using the Decision Inputs related list in the Decision Tables \\[sys\\_decision\\] table. Inputs contain these key-value pairs. -   searchField: String. Used for internal purposes.\n-   defaultValue: String. Default value for the input.\n-   show\\_ref\\_finder: Boolean. Used for internal purposes.\n-   use\\_dependent: Boolean. Used for internal purposes.\n-   type: String. Input data type.\n-   mandatory: Boolean. True if the input is mandatory; otherwise false.\n-   extended: Boolean. True if the input extends another field; otherwise false.\n-   local: Boolean. Used for internal purposes.\n-   sys\\_class\\_name: String. Used for internal purposes.\n-   reference: String. Reference table used if the input type is reference.\n-   dependent\\_on: String. Field that document ID and choice inputs depend on.\n-   data\\_structure: String. Used for internal purposes.\n-   readonly: Boolean. True if the input is read-only; otherwise false.\n-   id: String. Sys\\_id of the input from the Decision Inputs \\[sys\\_decision\\_input\\] table.\n-   type\\_label: String. Input data type label.\n-   table: String. Reference field table if the input type is reference.\n-   order: Number. Order in which the system evaluates inputs.\n-   ref\\_qual: String. Condition applied to the reference table.\n-   reference\\_display: String. Used for internal purposes.\n-   choiceOption: String. Method for users to see a list of suggested values.\n-   label: String. Label of the input record.\n-   hint: String. Hint text used to help users understand the input required.\n-   name: String. Internal name of the input record.\n-   attributes: Array. Field attributes that apply to the input record.\n-   maxsize: Number. Maximum number of characters allowed in the field.\n-   columnName: String. Name of the input.\n\n Format: JSON\n\n</td></tr></tbody>\n</table>```\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.getInputs(\"3c4464a7b701230034d1da23ee11a993\");\ngs.info(JSON.stringify(response));\n```\n\nOutput:\n\n```\n{\"result\": [{\n  \"searchField\": \"number\",\n  \"defaultValue\": \"\",\n  \"show_ref_finder\": false,\n  \"use_dependent\": false,\n  \"type\": \"reference\",\n  \"mandatory\": false,\n  \"extended\": false,\n  \"local\": false,\n  \"sys_class_name\": \"\",\n  \"reference\": \"change_request\",\n  \"dependent_on\": \"\",\n  \"data_structure\": \"\",\n  \"readonly\": false,\n  \"id\": \"634420a7b701230034d1da23ee11a94f\",\n  \"type_label\": \"Reference\",\n  \"table\": \"\",\n  \"order\": 100,\n  \"ref_qual\": \"\",\n  \"reference_display\": \"Change Request\",\n  \"choiceOption\": \"\",\n  \"label\": \"Change request\",\n  \"hint\": \"\",\n  \"name\": \"change_request\",\n  \"attributes\": {\"element_mapping_provider\": \"com.glide.decision_table.data.DecisionTableVariableMapper\"},\n  \"maxsize\": 32,\n  \"columnName\": \"\"\n}]}\n```\n\n## DecisionTableAPI - getQuestions\\(String decisionID\\)\n\nReturns the decisions from the Decision \\[sys\\_decision\\_question\\] table associated with the passed in decision table.\n\n|Name|Type|Description|\n|----|----|-----------|\n|decisionID|String|Sys\\_id of the Decision Table record from the Decision Tables \\[sys\\_decision\\] table.|\n\n<table id=\"table_zjb_l5c_hhb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nDecisions from the Decision \\[sys\\_decision\\_question\\] table associated with the decision table. You can find the decisions associated with a decision table using the Decisions related list in the Decision Tables \\[sys\\_decision\\] table. Decision records contain these key-value pairs.-   defaultAnswer: Boolean. True if this decision is the default for the decision table; otherwise false.\n-   condition: String. Conditions required to reach this decision. The fields available for the condition are the decision inputs that are associated with this decision table.\n-   answer: Object. Answer record associated with the decision. Answer objects contain these key-value pairs.\n    -   answerElementValues: Array. Answer element values associated with the answer record. Each record contains these key-value pairs:\n        -   answerElementName: String. Name of the answer element.\n        -   label: String. Answer record label.\n        -   table: String. Table of the answer element if the answer element is a Reference type.\n        -   type: String. Type of the answer element.\n        -   valid: Boolean. True if the record exists in the system; otherwise false.\n        -   value: String. Value of the answer element.\n    -   label: String. Answer record label.\n    -   multipleAnswerRecord: Boolean. True if this is a multiple answer record; otherwise false.\n    -   valid: Boolean. True if the record exists in the system; otherwise false.\n    -   value: String. Sys\\_id of the answer record.\n    -   table: String. Table containing the answer record.\n-   decisionTable: String. Sys\\_id of the decision table from the Decision Tables \\[sys\\_decision\\] table associated with the decision.\n-   domain: String. Domain in which the decision is visible.\n-   active: Boolean. True if the decision record is active; otherwise false.\n-   id: String. Sys\\_id of the decision record from the Decision \\[sys\\_decision\\_question\\] table.\n-   label: String. Label for the decision record.\n-   order: Number. Order in which the system evaluates decisions.\n\n Format: JSON\n\n</td></tr></tbody>\n</table>```\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.getQuestions(\"3c4464a7b701230034d1da23ee11a993\");\ngs.info(JSON.stringify(response));\n\n```\n\nOutput:\n\n```\n{\"result\": [{\n  \"defaultAnswer\": true,\n  \"condition\": \"change_request.state=-3^EQ\",\n  \"answer\": {\n    \"valid\": true,\n    \"label\": \"CAB Approval\",\n    \"value\": \"45358a5db701230034d1da23ee11a938\",\n    \"table\": \"chg_approval_def\"\n  },\n  \"decisionTable\": \"3c4464a7b701230034d1da23ee11a993\",\n  \"domain\": \"global\",\n  \"active\": true,\n  \"state\": null,\n  \"id\": \"2764a4a7b701230034d1da23ee11a989\",\n  \"label\": \"Requires CAB Approval\",\n  \"order\": 0\n}]}\n```\n\n## DecisionTableAPI - updateAnswerElement\\(String answerElementID, Object answerElement\\)\n\nUpdates a record in the Result \\[sys\\_decision\\_multi\\_result\\_element\\] table.\n\n<table id=\"table_bzf_nyg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nanswerElementID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the answer element record.Table: Result Elements \\[sys\\_decision\\_multi\\_result\\_element\\]\n\n</td></tr><tr><td>\n\nanswerElement\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs to update the answer element record.```\n{   \n   comments: \"String\", \n   label: \"String\",    \n   maxsize: Number\n}\n```\n\n</td></tr><tr><td>\n\nanswerElement.comments\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Description of the answer element.\n\n</td></tr><tr><td>\n\nanswerElement.label\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Label of the answer element record.\n\n</td></tr><tr><td>\n\nanswerElement.maxsize\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Maximum number of characters allowed in the answer element field. Use this property only if **answerElement.type** is `String`.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"record\": GlideRecord,\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.record\n\n</td><td>\n\nGlideRecord reference to the answer element updated in the Result Elements \\[sys\\_decision\\_multi\\_result\\_element\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example updates the label and comments for an answer element.\n\n```\nvar answerElementID = '51c707803d0b9910f8776a598af91217';\nvar answerElement = {\n   label: 'Product',\t\n   comments: 'hello'\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.updateAnswerElement(answerElementID, answerElement);\ngs.info('Status - ' + response.status);\ngs.info('Result Element label changed to - ' + response.record.getValue('label'));\n```\n\nOutput:\n\n```\nStatus - Success\nResult Element label changed to - Product\n```\n\n## DecisionTableAPI - updateChoice \\(String choiceID, Object choice\\)\n\nUpdates a record in the Choices \\[sys\\_choice\\] table.\n\n<table id=\"table_zcq_rzg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchoiceID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the choice record. Table: Choices \\[sys\\_choice\\]\n\n</td></tr><tr><td>\n\nchoice\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs to update the choice record.```\n{\n   label: \"String\",\n   order: Number,\n   value: \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nchoice.label\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Label of the choice.\n\n</td></tr><tr><td>\n\nchoice.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Order of the choice.\n\n</td></tr><tr><td>\n\nchoice.value\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Value of the choice.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"record\": GlideRecord,\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.record\n\n</td><td>\n\nGlideRecord reference to the choice updated in the Choices \\[sys\\_choice\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example updates the label, value, and order for a choice.\n\n```\nvar choiceID = '4532db883d0b9910f8776a598af912e7';\nvar choices = {\n   label: 'Delhi',\n   value: 'del',\n   order: 50\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.updateChoice(choiceID, choices);\ngs.info('Status - ' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n## DecisionTableAPI - updateCondition\\(String conditionID, Object condition\\)\n\nUpdates a record in the Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\] table.\n\n<table id=\"table_rrf_hyg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nconditionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision condition record. Table: Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\]\n\n</td></tr><tr><td>\n\ncondition\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs to update the decision condition record.```\n{   \n   defaultOperator: \"String\", \n   description: \"String\",    \n   label: \"String\"\n}\n```\n\n</td></tr><tr><td>\n\ncondition.defaultOperator\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Default operator for the condition. For a list of valid operators, see [Operators available for filters and queries](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/r_OpAvailableFiltersQueries.md).\n\n</td></tr><tr><td>\n\ncondition.description\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Description of the condition.\n\n</td></tr><tr><td>\n\ncondition.label\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Label of the decision condition record.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"record\": GlideRecord,\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.record\n\n</td><td>\n\nGlideRecord reference to the decision condition updated in the Decision Conditions \\[sn\\_decision\\_table\\_decision\\_condition\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example updates a decision condition.\n\n```\nvar conditionID = 'c9530f4c3dc79910f8776a598af912f1';\nvar condition = {\n   defaultOperator: '!=',\n   label: 'Active Incident',\n   description: 'Check if the incident is active'\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.updateCondition(conditionID, condition);\ngs.info('Status - ' + response.status);\ngs.info('Condition label changed to - ' + response.record.getValue('label'));\n```\n\nOutput:\n\n```\nStatus - Success\nCondition label changed to - Active Incident\n```\n\n## DecisionTableAPI - updateDecisionTable\\(String decisionID, Object decisionTable\\)\n\nUpdates a record in the Decision Tables \\[sys\\_decision\\] table.\n\n<table id=\"table_pnx_vxg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndecisionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision table record.Table: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\ndecisionTable\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs to update the decision table record.```\n{\n  \"accessibleFrom\": \"String\",\n  \"name\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\ndecisionTable.accessibleFrom\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Scopes that have access to the decision table record.Valid values:\n\n-   package\\_private\n-   public\n\n</td></tr><tr><td>\n\ndecisionTable.name\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Name of the decision table.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"record\": GlideRecord,\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.record\n\n</td><td>\n\nGlideRecord reference to the decision table.Data type: GlideRecord\n\nTable: Decision Tables \\[sys\\_decision\\]\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example updates a decision table.\n\n```\nvar decisionID = 'a1f6e14c3d039910f8776a598af9129d';\nvar decisionTable = {\n   name: 'Emergency Change Request',    \n   accessibleFrom: 'public',\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.updateDecisionTable(decisionID, decisionTable);\ngs.info('Status -' + response.status);\ngs.info('Decision Table sys id - ' + response.record.getValue('sys_id'));\n```\n\nOutput:\n\n```\nStatus - Success\nDecision Table sys id - a1f6e14c3d039910f8776a598af9129d\n```\n\n## DecisionTableAPI - updateInput\\(String inputID, Object input\\)\n\nUpdates a record in the Decision Inputs \\[sys\\_decision\\_input\\] table.\n\n<table id=\"table_zzd_dyg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ninputID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the decision input record.Table: Decision Inputs \\[sys\\_decision\\_input\\]\n\n</td></tr><tr><td>\n\ninput\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs to update a decision input record.\n\n ```\n{\n   active: Boolean,\n   defaultValue: \"String\",\n   label: \"String\",\n   mandatory: Boolean,\n   maxsize: Number,\n   order: Number,\n   readonly: Boolean\n}\n```\n\n</td></tr><tr><td>\n\ninput.active\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether the decision input record is active.\n\n Valid values:\n\n-   true: The decision input record is active.\n-   false: The decision input record is not active.\n\n</td></tr><tr><td>\n\ninput.defaultValue\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Default value for the input.\n\n</td></tr><tr><td>\n\ninput.label\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Label of the decision input record.\n\n</td></tr><tr><td>\n\ninput.mandatory\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether the input is mandatory.\n\n Valid values:\n\n-   true: The input is mandatory.\n-   false: The input is not mandatory.\n\n</td></tr><tr><td>\n\ninput.maxsize\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Maximum number of characters allowed in the input field. Use this property only if **input.type** is `String`.\n\n</td></tr><tr><td>\n\ninput.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Order of the input.\n\n</td></tr><tr><td>\n\ninput.readonly\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether the input is read-only.\n\n Valid values:\n\n-   true: The input is read-only.\n-   false: The input is not read-only.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"record\": GlideRecord,\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.record\n\n</td><td>\n\nGlideRecord reference to the decision input updated in the Decision Inputs \\[sys\\_decision\\_input\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example updates a decision input.\n\n```\nvar inputID = 'e862f1803dc39910f8776a598af912da';\nvar input = {\n   label: 'Item name',\n   defaultValue: 'Apple',\n   maxsize: 100,\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.updateInput(inputID, input);\ngs.info(JSON.stringify(response));\ngs.info('Status - ' + response.status);\ngs.info('Input label changed to - ' + response.record.getValue('label'));\n\n```\n\nOutput:\n\n```\nStatus - Success\nInput label changed to - Item name\n```\n\n## DecisionTableAPI - updateQuestion\\(String questionID, Object question\\)\n\nUpdates a record in the Decisions \\[sys\\_decision\\_question\\] table.\n\n<table id=\"table_c4l_syg_qvb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nquestionID\n\n</td><td>\n\nString\n\n</td><td>\n\nSys\\_id of the question record.Table: Decisions \\[sys\\_decision\\_question\\]\n\n</td></tr><tr><td>\n\nquestion\n\n</td><td>\n\nObject\n\n</td><td>\n\nKey-value pairs to update the question record.```\n{\n  \"active\": Boolean,\n  \"answer\": [Array],\n  \"condition\": \"String\",\n  \"defaultAnswer\": Boolean,\n  \"label\": \"String\",\n  \"order\": Number\n}\n```\n\n</td></tr><tr><td>\n\nquestion.active\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether the question record is active.\n\n Valid values:\n\n-   true: The question record is active.\n-   false: The question record isn't active.\n\n</td></tr><tr><td>\n\nquestion.answer\n\n</td><td>\n\nArray\n\n</td><td>\n\nOptional. List of possible answers to the question.For a single result table, the array can only have one object. For a multi-result table, the array can have multiple objects.\n\n```\n[\n  {\n    \"name\": \"String\",\n    \"value\": \"String\"\n  }\n]\n```\n\n</td></tr><tr><td>\n\nquestion.answer.name\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Name of the answer element.Table: Result Elements \\[sys\\_decision\\_multi\\_result\\_element\\]\n\n</td></tr><tr><td>\n\nquestion.answer.value\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Value of the answer element.Table: Result Elements \\[sys\\_decision\\_multi\\_result\\_element\\]\n\n</td></tr><tr><td>\n\nquestion.condition\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Conditions required to reach this question.The fields available for the conditions are the decision inputs that are associated with the decision table.\n\nFor more information about creating conditions, see [Operators available for filters and queries](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/r_OpAvailableFiltersQueries.md).\n\n</td></tr><tr><td>\n\nquestion.defaultAnswer\n\n</td><td>\n\nBoolean\n\n</td><td>\n\nOptional. Flag that indicates whether this question is the default question for the decision table.Valid values:\n\n-   true: The question is the default question.\n-   false: The question isn't the default question.\n\n</td></tr><tr><td>\n\nquestion.label\n\n</td><td>\n\nString\n\n</td><td>\n\nOptional. Label of the question record.\n\n</td></tr><tr><td>\n\nquestion.order\n\n</td><td>\n\nNumber\n\n</td><td>\n\nOptional. Order of the question.\n\n</td></tr></tbody>\n</table><table id=\"table_ps1_bgn_lvb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nObject\n\n</td><td>\n\nInformation about the status of the API request.```\n{\n  \"errors\": [Array],\n  \"record\": GlideRecord,\n  \"status\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors\n\n</td><td>\n\nError information.Data type: Array of Objects\n\n```\n\"errors\": [\n  {\n    \"message\": \"String\",\n    \"type\": \"String\n  }\n]\n```\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.message\n\n</td><td id=\"errors-message-entry\">\n\nError message.Data type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.errors.type\n\n</td><td id=\"errors-type-entry\">\n\nType of error.Possible value: INTERNAL\\_ERROR\n\nData type: String\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.record\n\n</td><td>\n\nGlideRecord reference to the question updated in the Decisions \\[sys\\_decision\\_question\\] table.Data type: GlideRecord\n\n</td></tr><tr><td>\n\n&lt;Object&gt;.status\n\n</td><td>\n\nStatus of the API request.Possible values:\n\n-   Failure\n-   Success\n\nData type: String\n\n</td></tr></tbody>\n</table>This example updates a question record.\n\n```\nvar questionId = '70381fcc3d0b9910f8776a598af91219';\nvar questions = {\n   condition: 'u_item=Laptop^u_price>1800^EQ',\n   answer:[\n      {\n         name: 'u_discount',\n         value: '40',\n      },\n      {\n         name: 'u_seller',\n         value: '02826bf03710200044e0bfc8bcbe5d64',\n      },\n   ],\n   active: true,\n   order: 3000\n};\n\nvar dt = new sn_dt.DecisionTableAPI();\nvar response = dt.updateQuestion(questionId, questions);\ngs.info('Status - ' + response.status);\n```\n\nOutput:\n\n```\nStatus - Success\n```\n\n"}}