Guided Workflow Screen Components - Toggle
Updated
Overview
A toggle is a versatile user interface element that enables users to switch between two distinct states, typically "on" and "off" or "enabled" and "disabled." It functions like a switch, allowing users to easily activate or deactivate features or options within a workflow. Toggles are commonly used to control settings such as enabling or disabling notifications, choosing communication preferences (like text or email), or opting in or out of specific services. They offer a modern, visually intuitive alternative to traditional checkboxes or radio buttons. Toggles also provide flexibility by allowing developers to set conditions that can disable them, preventing users from interacting with the feature under certain circumstances. This functionality ensures a seamless and accessible user experience while maintaining clarity and control in user-driven processes.
Common Use Cases
Settings Panels: Turning features or options on/off.
Preferences: Enabling or disabling specific preferences in apps or websites.
Various Fields in Toggle Bar
API Name: The API Name is a unique identifier used to reference a particular object, field, or component in an application programmatically. It is typically used in backend code, integrations, or API calls. API Names are often system-generated and follow a specific naming convention, such as using underscores instead of spaces (e.g., Customer_Status__c).
Label: The Label is the user-friendly name for an object, field, or component that is displayed in the user interface (UI). It is designed to be easily understood by end-users and often includes spaces or capitalization for readability (e.g., "Customer Status").
Default Value: Sprinklr allows you to set the default state of the toggle bar. If set to active, the toggle will appear as active by default, and if set to inactive, it will appear as inactive.
Active Label: This defines the text that will be displayed when the toggle is active.
Inactive Label: This shows the text displayed when the toggle is inactive.
Enable Reporting: Once this feature is enabled, you can utilise this field for reporting purposes.
Visibility Conditions: A rule or set of rules that determine whether a specific element, field, or component is visible to users in an application or interface. These conditions are typically based on factors such as user roles, permissions, field values, or contextual data. Visibility conditions ensure that users only see relevant information, improving usability and security.
Example
Condition: Display a "Priority Escalation" section if the "Ticket Priority" is set to "High."
Implementation:
Visibility Condition: Ticket_Priority == 'High'
Result: The "Priority Escalation" section appears only for high-priority tickets.
Disability Condition: A rule or set of criteria that determines whether a specific element, such as a field, button, or component, should be disabled (i.e., grayed out and non-interactive) in a user interface. It restricts user interaction based on certain conditions, ensuring that actions are contextually valid or preventing errors.
Example:
Based on Field Value:
Condition: Disable the "Submit" button if the "Terms and Conditions" checkbox is unchecked.
Result: The user cannot submit the form until they accept the terms.
Based on User Role:
Condition: Disable the "Delete Record" button for users without "Admin" permissions.
Result: Only admins can delete records, while other users see the button but cannot interact with it.
Based on Data Completeness:
Condition: Disable the "Next" button until all required fields are filled.
Result: Users are prevented from moving forward until they complete the required steps.