Quick chatbot integration

To embed the Ask Extension chatbot into your website, you must minimally include the following in your HTML:

            
                <!-- Begin Ask Extension Widget embed code -->
                <div id="ae-chatbot-widget" style=""></div>
                <script src="https://chat.ask.eduworks.com/static/js/widget-loader.js"></script>
                <!-- End Ask Extension Widget embed code -->
        

Branding and styling

To style the chatbot to match your site’s theme you can pass custom CSS styles. All of these settings are optional, but each one will override part of the default look and feel. All of the settings must be added inside the style="" property, each separated by a semi-colon.

At minimum, set the --chatbot-brand-primary-color to your theme’s main color. This can be a hex color, rbg, or other standard CSS color value. For example:

            
                <!-- Begin Ask Extension Widget embed code -->
                <div id="ae-chatbot-widget" style="--chatbot-brand-primary-color: #f0721f;"></div>
                <script src="https://chat.ask.eduworks.com/static/js/widget-loader.js"></script>
                <!-- End Ask Extension Widget embed code -->
        

The following styles apply to the chatbot icon that appears in the corner of the screen.

The following styles apply to the open chatbot window and its contents.

Example of a restyled chatbot:

            
                <!-- Begin Ask Extension Widget embed code -->
                <div id="ae-chatbot-widget" style="
                --chatbot-brand-primary-color: orange;
                --chatbot-modal-margin: 2rem;
                --chatbot-modal-radius: 8px;
                --chatbot-modal-border: 3px solid orange;
                "></div>
                <script src="http://localhost:8081/static/js/widget-loader.js"></script>
                <!-- End Ask Extension Widget embed code -->
        

Customizing chatbot behavior

To modify the chatbot's behavior for your integration, you need to also define a constant called "ae_widget_config_params". This allows you to filter by state and, in the future, institution.

            
                <!-- Begin Ask Extension Widget embed code -->
                <div id="ae-chatbot-widget" style=""></div>
                <script>
                // The following const definition is optional, but allows you to configure the chatbot.
                // If any settings are not provided, default values will be used.
                const ae_widget_config_params = {
                    list_of_states: ["Texas", "Oklahoma", "Kansas", "Arkansas", "Missouri"],
                    state_downweight: 0.9,
                    source: "oklahoma state",
                    source_downweight: 0.9,
                    extension_office_url: "https://extension.okstate.edu/county/",
                    state: "Oklahoma",
                }
                </script>
                <script src="https://chat.ask.eduworks.com/static/js/widget-loader.js"></script>
                <!-- End Ask Extension Widget embed code -->
        

About the configuration parameters