Several data fields in solutions are stored in the encodedFieldData property of the SVC_SOLN table. These fields are encoded in JSON (JavaScript Object Notation) format. See general information about JSON at http://www.json.org/.
JSON Grammar for Encoding Solutions
The JSON elements used to encode solution information in the encodedFieldData property of the SVC_SOLN table are explained in the following table. See information about JSON syntax at http://www.json.org/.
See examples of encoded solution information that use these elements in the following sections:
- JSON Element - Syntax - encodedFieldData- JSONObject(fieldName : fields)- fieldName- A string that represents the field name - fields- JSONArrayof- field- field- JSONArrayof- fieldId,- solutionClassFieldDefinition,- fieldValues- fieldId- JSONObject("id" : String)- solutionClassFieldDefinition- JSONObject("solutionClassFieldDefinition"- :- String)- fieldValues- JSONObject("values"- :- JSONArray of fieldValue)- fieldValue- JSONObjectwith attributes- fieldValueId,- fieldType,- fieldValueAttr,- fieldValueInternalAudience,- fieldValueExternalAudience- fieldValueId- JSONObject("id" : String)- fieldType- JSONObject("type" : fieldTypeConstant)- fieldTypeConstant- String equal to one of the following values: “ - BooleanType”, “- DateType”, “- DecimalType”, “- ListType”, “- NumberType”, “- OrganizationType”, “- StatementType”, “- TextType”, “- TransactionalFragmentType”, or “- UserType.”- fieldValueAttr- One of the following elements: - bigStringValue,- booleanValue,- dateValue,- fragmentValue,- numberValue, or- stringValue.- bigStringValue- JSONObject("BIGSTRING" : String)- booleanValue- JSONObject("BOOLEAN" : Boolean)- dateValue- JSONObject("DATE" : Long)- fragmentValue- JSONObject("FRAGMENT" : fragment)- numberValue- JSONObject("NUMBER" : Float)- stringValue- JSONObject("STRING" : String)- fragment- JSONArrayof- fragmentId,- fragmentPath,- fragmentParameters- fragmentId- JSONObject("id" : String)- fragmentPath- JSONObject("fragmentPath" : String)- fragmentParameters- JSONObject("parameters" : JSONArrayof- fragmentParameter)- fragmentParameter- JSONObjectwith the attributes- fragmentParameterId,- fragmentParameterName, and- fragmentParameterValue.- fragmentParameterId- JSONObject("id" : String)- fragmentParameterName- JSONObject("name" : String)- fragmentParameterValue- JSONObject("value" : String)- fieldValueInternalAudience- JSONArrayof- String. Representing internal segments.- fieldValueExternalAudience- JSONArrayof- String. Represents external segments.
Encoding FAQ Solutions
This section provides an example of a JSON-encoded solution. The solution was created with the preconfigured FAQ solution class.
{
  "answers": {
    "id": "219406",
    "values": [
      {
        "id": "219408",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Your question is unknown.<\/p>"
       }
    ],
    "solutionClassFieldDefinition": "SvcFAQAnswer"
  },
  "questions": {
    "id": "219407",
    "values": [
      {
        "id": "219409",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>What is my question?<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcFAQQuestion"
  }
}Encoding Break-Fix Solutions
This section provides an example of a JSON-encoded solution. The solution was created with the preconfigured Break-Fix solution class.
{
  "fact": {
    "id": "219485",
    "values": [
      {
        "id": "219492",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>The system requires input.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcBFFact"
  },
  "cause": {
    "id": "219484",
    "values": [
      {
        "id": "219491",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>The system has no input. Input is required for
           output.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcBFCause"
  },
  "fix": {
    "id": "219486",
    "values": [
      {
        "id": "219493",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Supply input to the system.<\/p>"
      }
    ],
  "solutionClassFieldDefinition": "SvcBFFix"
  },
  "change": {
    "id": "219487",
    "values": [
      {
        "id": "219494",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>System defaults have been removed.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcBFChange"
  },
  "goal": {
    "id": "219489",
    "values": [
      {
        "id": "219496",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Restore system function.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcBFGoal"
  },
  "note": {
    "id": "219488",
    "values": [
      {
        "id": "219495",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Integers are the only valid input.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcBFNote"
  },
  "symptom": {
    "id": "219490",
    "values": [
      {
        "id": "219497",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>The system produces no output.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcBFSymptom"
  }
}Encoding Question-Answer Solutions
This section provides an example of a JSON-encoded solution. The solution was created with the preconfigured Question-Answer solution class.
{
  "answer": {
    "id": "219532",
    "values": [
      {
        "id": "219535",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Your question is unknown.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcQAAnswer"
  },
  "question": {
    "id": "219533",
    "values": [
      {
        "id": "219536",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>What is my question?<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcQAQuestion"
  },
  "note": {
    "id": "219534",
    "values": [
      {
        "id": "219537",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Ask useful questions.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcQANote"
  }
}Encoding Multiple Statements
This section provides an example of a JSON-encoded solution with multiple statements.
{
  "answers": {
    "id": "219652",
    "values": [
      {
        "id": "219654",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Sometimes it rains.<\/p>"
      },
      {
        "id": "219655",
        "internalModify": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Sometimes it does not rain.<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcFAQAnswer"
  },
  "questions": {
    "id": "219653",
    "values": [
      {
        "id": "219656",
        "internalModify": [
          "Everyone-Internal"
        ],
        "internalAudience": [
          "Everyone-Internal"
        ],
        "externalAudience": [
          "Everyone-External"
        ],
        "type": "StatementType",
        "BIGSTRING": "<p>Does it rain in your town?<\/p>"
      }
    ],
    "solutionClassFieldDefinition": "SvcFAQQuestion"
  }
}
