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
encodedFieldDataJSONObject(fieldName : fields)fieldNameA string that represents the field name
fieldsJSONArrayoffieldfieldJSONArrayoffieldId,solutionClassFieldDefinition,fieldValuesfieldIdJSONObject("id" : String)solutionClassFieldDefinitionJSONObject("solutionClassFieldDefinition":String)fieldValuesJSONObject("values":JSONArray of fieldValue)fieldValueJSONObjectwith attributesfieldValueId,fieldType,fieldValueAttr,fieldValueInternalAudience,fieldValueExternalAudiencefieldValueIdJSONObject("id" : String)fieldTypeJSONObject("type" : fieldTypeConstant)fieldTypeConstantString equal to one of the following values: “
BooleanType”, “DateType”, “DecimalType”, “ListType”, “NumberType”, “OrganizationType”, “StatementType”, “TextType”, “TransactionalFragmentType”, or “UserType.”fieldValueAttrOne of the following elements:
bigStringValue,booleanValue,dateValue,fragmentValue,numberValue, orstringValue.bigStringValueJSONObject("BIGSTRING" : String)booleanValueJSONObject("BOOLEAN" : Boolean)dateValueJSONObject("DATE" : Long)fragmentValueJSONObject("FRAGMENT" : fragment)numberValueJSONObject("NUMBER" : Float)stringValueJSONObject("STRING" : String)fragmentJSONArrayoffragmentId,fragmentPath,fragmentParametersfragmentIdJSONObject("id" : String)fragmentPathJSONObject("fragmentPath" : String)fragmentParametersJSONObject("parameters" : JSONArrayoffragmentParameter)fragmentParameterJSONObjectwith the attributesfragmentParameterId,fragmentParameterName, andfragmentParameterValue.fragmentParameterIdJSONObject("id" : String)fragmentParameterNameJSONObject("name" : String)fragmentParameterValueJSONObject("value" : String)fieldValueInternalAudienceJSONArrayofString. Representing internal segments.fieldValueExternalAudienceJSONArrayofString. 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"
}
}
