The Healthily API response will always return a boolean value for the "popup" item. This should be used to evaluate how a message should be rendered in your user interface.

ValueDescription
TrueMessage should be displayed as a popup, modal or similar. This type of message is typically used to present a confirmation or user action outside the conversation flow.
FalseMessage is part of the standard conversation flow and should not be displayed as a popup, modal or similar.

Examples

Popup message

{
    "popup": true,
    "messages": [
        {
            "type": "TEXT",
            "value": "Are you sure you want to end this assessment?",
            "meta": {}
        },
        {
            "type": "TEXT",
            "value": "These symptoms will be deleted. This can't be undone.",
            "meta": {}
        }
    ],
    "question": {
        "mandatory": true,
        "multiple": false,
        "choices": [
            {
                "id": "0",
                "label": "CANCEL"
            },
            {
                "id": "1",
                "label": "END ASSESSMENT"
            }
        ]
    },
    "conversation_model": {
        "conversation_context": {
            "conversation": true,
            "type": "ASSESSMENT"
        },
        "symptoms_summary": {},
        "report": {}
    },
    "conversation_id": "d15e2b95-fa75-4a26-a799-237468c5643c"
}

Standard message

{
    "popup": false,
    "messages": [
        {
            "type": "TEXT",
            "value": "Do you also have any of these symptoms today?",
            "meta": {}
        }
    ],
    "question": {
        "mandatory": false,
        "multiple": true,
        "choices": [
            {
                "id": "CM000848",
                "label": "Pain on side of knee"
            },
            {
                "id": "CM000860",
                "label": "Pain at front of knee"
            },
            {
                "id": "CM000861",
                "label": "Pain below the kneecap"
            },
            {
                "id": "C2110498",
                "label": "Knee pain worse with activity"
            },
            {
                "id": "None of them",
                "label": "None of them"
            }
        ]
    },
    "conversation_model": {
        "conversation_context": {
            "conversation": true,
            "type": "ASSESSMENT"
        },
        "symptoms_summary": {
            "selected": [
                "Painful knee"
            ]
        },
        "report": {}
    },
    "available_commands": [
        "STOP_CONVERSATION"
    ],
    "conversation_id": "d15e2b95-fa75-4a26-a799-237468c5643c"

What’s Next