Skip to main content

Result Bar

Result Bar is a read-only summary step that returns the score of correct answers to the user.

Step Config

KeyDescriptionIs Optional?
typeShould be resultBar to differs from other steps.Required
stepIdUnique step identifier.Required
pretitleText added pre title text.Optional
pretitleColorColor of the pre-title text.Optional
titleTitle text added on top of the step.Required
titleColorColor of the title text.Optional
barBar ConfigRequired
imageImage URL to be shown after the barOptional
descriptionDescription text which is added after the image.Optional
descriptionColorColor of the description text.Optional
cta[User Result Echo](User Result Echo)Required

Bar Config

KeyDescriptionIs Optional?
textBar’s textRequired
textColorBar’s text colorOptional
barColorBar’s background colorRequired
borderColorBar’s border colorRequired
correctAnswersCountCount of the correct answers, can use JEXL expression (ex. {{getOnboardingAnswerValue('step_id_1') + getOnboardingAnswerValue('step_id_2') + getOnboardingAnswerValue('step_id_3')}} NB: Double check the answer values are added as a number and not a stringRequired
questionsCountCount of the questionsRequired

CTA Config

KeyDescriptionIs Optional?
textCTA text.Required
backgroundColorCTA background color.Optional
textColorCTA text color.Optional
showButtonsDelayDelay in ms before showing the CTAOptional
soundEffectAdd sound effect linkOptional
hideArrowWhether to hide or show CTA arrow, accepts true and false.Optional

Example

UsersResultEcho
{
"id": "mind_app_id",
"language": "en",
"appId": "co.thefab.mind",
"seo": {
"title": "Lumiere",
"favicon": "https://c.thefab.co/web-onboarding/mind/mind-favicon.png",
"description": "Manage stress and anxiety through self-care practices and empowering affirmations. Embark on a journey of self-love."
},
"sections": [
{
"title": "Spot the Myths",
"titleColor": "#F55336",
"start": "step_id_1",
"end": "step_id_3",
"progressColor": "#F55336",
"progressEndColor": "transparent",
"progressBgColor": "#f5533633"
}
],
"steps": [
{
"stepId": "step_id_1",
"type": "yesNoQuestion",
"textColor": "#F55336",
"title": "Fasting gets in the way of social activities.",
"ctas": [
{
"text": "Fact",
"value": 1,
"textColor": "#F55336",
"hoverBackgroundColor": "#FDDDD7",
"backgroundColor": "#FFEEEB"
},
{
"text": "Myth",
"value": 0,
"textColor": "#F55336",
"hoverBackgroundColor": "#FDDDD7",
"backgroundColor": "#FFEEEB"
}
]
},
{
"stepId": "step_id_2",
"type": "yesNoQuestion",
"textColor": "#F55336",
"title": "The only benefit of fasting is weight loss.",
"ctas": [
{
"text": "Fact",
"value": 1,
"textColor": "#F55336",
"hoverBackgroundColor": "#FDDDD7",
"backgroundColor": "#FFEEEB"
},
{
"text": "Myth",
"value": 0,
"textColor": "#F55336",
"hoverBackgroundColor": "#FDDDD7",
"backgroundColor": "#FFEEEB"
}
]
},
{
"stepId": "step_id_3",
"type": "yesNoQuestion",
"textColor": "#F55336",
"title": "Foods like cheese, chocolate, juice, desserts, and alcohol are okay to eat during your eating window.",
"ctas": [
{
"text": "Fact",
"value": 1,
"textColor": "#F55336",
"hoverBackgroundColor": "#FDDDD7",
"backgroundColor": "#FFEEEB"
},
{
"text": "Myth",
"value": 0,
"textColor": "#F55336",
"hoverBackgroundColor": "#FDDDD7",
"backgroundColor": "#FFEEEB"
}
]
},
{
"stepId": "bar",
"type": "resultBar",
"pretitle": "Challenge",
"pretitleColor": "#F55336",
"title": "Results",
"titleColor": "#F55336",
"image": "https://storage.googleapis.com/c.thefab.co/Shape/onboarding/Mascots/sesame-right-answer%201.png",
"description": "A Myth Buster! You have a solid understanding of fasting. Let's turn this knowledge into action with a fasting routine that works for you.",
"descriptionColor": "#F55336",
"bar": {
"text": "Correct answers",
"textColor": "#01AF88",
"barColor": "linear-gradient(90deg, #B2D927 0%, #00AF88 100%)",
"borderColor": "#01AF88",
"correctAnswersCount": "{{getOnboardingAnswerValue('step_id_1') + getOnboardingAnswerValue('step_id_2') + getOnboardingAnswerValue('step_id_3')}}",
"questionsCount": 3
},
"cta": {
"text": "Continue",
"backgroundColor": "#F55336",
"textColor": "#FFFFFF"
}
}
],
"logic": []
}