Doctorlink has joined HealthHerohealthheroLearn More
doctorlink

Node

Below is the JSON representation of a Node. Nodes are sent with all Traversal API responses while traversing a product, with the exception of a complete traversal which will return as an empty node array []. If you reach an empty node array, you should make the call to retrieve the conclusions: /api/v1/{tenantId}/Traversals/{traversalId}/conclusions.

{
     "assetId": int,
     "data": "JSONString",
     "displayText": "string",
     "errors": string[],
     "explanation": "string",
     "isTable": bool,
     "nodeId": int,
     "questions": Question[],
     "title": "string"
 }

AssetId : Identifier of this nodes asset.

Data : A stringified JSON object of data for this node, added by the content creators. This can be used to tell the UI any special requirements, or simply as a system notification.

DisplayText : A message to the user.

Errors : This will describe any validation errors or problems when responding to the API.

Explanation : A more in-depth message to the user usually shown as a clickable information icon (:information_source:).

IsTable : A boolean notifying the UI that the Questions should be displayed as a table. (add a picture here!)

NodeId : Unique identifier of the node you're currently on.

Questions : An array of Questions. More than one Question usually indicates that a table may be necessary. If you opt to use the /api/v1/{tenantId}/ChatTraversals endpoint, you will only ever see one question at a time, and tables will be redundant.

Title : The title of the node.