alby-guided-questionnaire

Help customers find the right products by presenting a series of questions that narrow down products within a category.

Prerequisites

  • Ensure alby is installed to unlock these elements and elevate your storefront. Learn more here.
  • This widget triggers the alby chatbot, please ensure that is setup before using this widget. You can set it up on the experiences page inside the alby dashboard.

Usage

The alby-guided-questionnaire component can be embedded in your webpage with the below example.

Basic Example

<alby-guided-questionnaire
   category="CATEGORY-NAME"
   product-ids="PRODUCT-ID-1,PRODUCT-ID-2,PRODUCT-ID-3"
   widget-id="widget-id"
></alby-guided-questionnaire>


Properties

AttributeDescriptionTypeDefaultRequired
widget-idThe unique identifier for the widget, found on the Widget Embed page in the alby Dashboard. Required for correctly loading the designated widget instance.stringundefinedYes
categoryThe product category for contextual AI responses.booleanundefinedYes
product-idsComma-separated list of external product IDs for multi-product contexts.stringundefinedYes
test-modeEnables internal testing of the widget. When enabled, conversations created will not appear in the inbox or impact reporting. This is not related to A/B testing.booleanundefinedNo

CSS Variables Configuration

The alby-guided-questionnaire component can be customized using CSS custom properties (CSS variables). These variables allow you to control the appearance and behavior of the guided questionnaire without modifying the component's internal styles.

Usage

You can set these variables using inline styles on the component:

<alby-guided-questionnaire
  style="--alby-guided-questionnaire-background: #000; --alby-guided-questionnaire-button-color: #fff"
></alby-guided-questionnaire>

Priority Order

CSS variables follow this priority order (highest to lowest):

  1. Inline styles - Set directly on the component element
  2. Widget styling - Configured through the Alby dashboard
  3. Default values - Built-in component defaults

Available CSS Variables

CSS VariableDescriptionDefault Value
--alby-guided-questionnaire-max-width-desktopSets the maximum width of the questionnaire container on desktop640px
--alby-guided-questionnaire-max-width-mobileSets the maximum width of the questionnaire container on mobile100%
--alby-guided-questionnaire-container-paddingSets the padding of the questionnaire container24px
--alby-guided-questionnaire-backgroundSets the background color of the questionnaire container#ffffff
--alby-guided-questionnaire-border-widthSets the border width of the questionnaire container1px
--alby-guided-questionnaire-border-colorSets the border color of the questionnaire container#f3f4f6
--alby-guided-questionnaire-border-radiusSets the border radius of the questionnaire container16px
--alby-guided-questionnaire-font-sizeSets the font size of the question text18px
--alby-guided-questionnaire-question-font-weightSets the font weight of the question text500
--alby-guided-questionnaire-question-colorSets the text color of the question#111827
--alby-guided-questionnaire-button-font-sizeSets the font size of the option buttons14px
--alby-guided-questionnaire-button-paddingSets the padding of the option buttons8px 16px
--alby-guided-questionnaire-button-backgroundSets the background color of the option buttons#F0F2F7
--alby-guided-questionnaire-button-colorSets the text color of the option buttons#1F2A37
--alby-guided-questionnaire-button-borderSets the border of the option buttonsnone
--alby-guided-questionnaire-button-border-radiusSets the border radius of the option buttons9999px
--alby-guided-questionnaire-icon-displaySets the display property of the AI logo iconblock
--alby-guided-questionnaire-icon-sizeSets the size of the AI logo icon18px
--alby-guided-questionnaire-icon-colorSets the color of the AI logo icon#111928
--alby-guided-questionnaire-font-familySets the font family for the entire componentFigtree, sans-serif

Notes

  • The component automatically applies responsive behavior for mobile devices using the --alby-guided-questionnaire-max-width-mobile variable
  • Responsive Breakpoint: The component uses @media (max-width: 768px) as the breakpoint to switch between desktop and mobile layouts