Key terms referred in Web Embeddables
Summarize
Summary of Key Terms Referred in Web Embeddables
This document outlines essential terms related to Web Embeddables in ServiceNow, providing customers with a clear understanding of key components that facilitate the integration of ServiceNow functionalities into their websites. Understanding these terms is crucial for ensuring proper implementation and user experience.
Show less
Key Features
- Global Code: A common script for all ServiceNow components that sets themes, URLs, authentication, and locale settings. It optimizes performance by pre-caching necessary resources and must be included for correct rendering and functionality.
- Component Code: Specific scripts for individual components that control their behavior and appearance on your webpage. Each component has unique code essential for integration and operation.
- CORS (Cross-Origin Resource Sharing) Rules: Security measures that manage how resources are accessed from different domains, ensuring secure communication between embedded components and ServiceNow.
- Event Handler: Configures actions or responses to events on your website, such as alerts or error notifications associated with components.
- Static Preview: A visual representation of components when live previews are unavailable, allowing for layout review without real-time changes reflecting.
- Component Instance: Allows administrators to save, retrieve, and manage configurations for embedded components, including renaming and rearranging within groups.
- Group: A structure for modeling the webpage layout, wherein component instances are organized, facilitating easier management.
- Module: Represents a collection of pages or sections of a website, derived from group and component metadata, to maintain consistent theming and URL configurations.
Key Outcomes
By understanding and effectively implementing these key terms, ServiceNow customers can enhance their website’s integration with ServiceNow components, ensuring a secure, efficient, and user-friendly experience. Proper use of global and component codes, alongside CORS rules, is critical for maintaining functionality and security across embedded components.
The following are the key terms referred in Web Embeddables.
| Term | Description |
|---|---|
| Global code | Global code is a common script for all the ServiceNow components. It enables you to define component themes, base URLs, authentication callbacks, and locale settings before embedding components onto your website. Additionally, it optimizes component performance by pre-caching the resources required for the components. You must add global code before adding component code onto your website hosting ServiceNow web embeddable components verifying a consistent look and feel, secure communication, and proper localization. Without including this script, your components don't render correctly or function as expected, potentially leading to issues with your user experience and functionality. |
| Component code | Component code is a component-specific script designed for each component that enables you to define how each component behaves, appears, and integrates within your webpage. The code contains all the necessary logic and functions to ensure the integration and operation of the components in your website’s ecosystem. Facilitating the proper display and interaction of the component but also managing dependencies with other components. Note: The component code is unique for all ServiceNow components. |
| CORS (Cross-Origin Resource Sharing) rules | CORS rules are a security mechanism in web browsers designed to control how resources on your webpages are accessed from different domains. This mechanism helps protect your data and resources from unauthorized
access. By configuring CORS rules, you can specify and enforce access policies verifying that your embedded components can securely communicate with ServiceNow components. It is crucial for maintaining the integrity and security of your interactions on the website. |
| Event handler | An event handler lets you configure actions, components, or declarative actions on your website. For example, you can map an event to your component to display an alert notification when the user selects any button on the confirmation message, or you can add an event handler to respond to a record creation failure. |
| Static preview | The static preview provides a visual representation of your component when a live preview is unavailable. It enables you to understand the component layout and design. However, with static preview enabled, any changes
made to global or component properties aren't reflected in the preview in real time. This feature is useful for reviewing components in scenarios where dynamic rendering isn’t available. The Static preview is not available for custom and Data visualization component. |
| Component instance | Enables administrator to save and retrieve configuration of a component embedded on a specific location on the third-party website. Component instances can be renamed, duplicated, and rearranged within the group or across groups. |
| Group | Enables administrator to model their third-party website structure such as pages or sections. After recreating the website’s structure, administrator can add component instances within the group. |
| Module | A module represents a website with a collection of pages or a section using groups and a collection of components instances embedded on the website. The theme for component instances, external domain URL for CORS, and custom ServiceNow domain for base URL are derived from module meta data. |