Omnistudio Omniscript Advanced [EP-5]
3 min read
1 year ago
Published on Aug 05, 2024
This response is partially generated with the help of AI. It may contain inaccuracies.
Table of Contents
Introduction
This tutorial provides a comprehensive guide on using Omnistudio Omniscripts, focusing on advanced functionalities through two real-world use cases: quoting in the insurance industry and e-commerce in the communications sector. By the end of this tutorial, you will understand how to configure Omniscripts effectively, utilize Lightning Web Components, and troubleshoot common issues.
Step 1: Understanding Omniscripts
- Omniscripts are identified by type, language, and a label.
- Key components include:
- Types: Define the purpose of the Omniscript.
- Subtypes: Specific functionalities related to the type.
- Elements: Drag and drop elements from the build tab to create your script.
Step 2: Building the Omniscript
- Navigate to the build tab to start creating your Omniscript.
- Drag components from the sidebar into your workspace.
- Configure component properties on the right panel.
- Use the preview feature to monitor the JSON DOM that maintains data throughout execution.
Step 3: Utilizing Lightning Web Components
- Focus on using Lightning Web Components for user interactions.
- Understand the different categories of components:
- Actions
- Display Functions
- Inputs
- Use components such as Get Rated Products and Create Update Quote, which are built out-of-the-box with Velocity.
Step 4: Collecting User Input
- Create steps for users to enter data (e.g., business information for insurance quotes).
- Use formulas to transform user input into the required formats for services.
- For example, concatenate date and time to create a code effective date.
Step 5: Executing Services
- Use services to interact with external data:
- Get Rated Products: Retrieve eligible insurance products based on user input.
- Create Update Quote: Create a quote based on the user’s selections.
- Ensure correct parameters are sent; otherwise, you will encounter errors.
Step 6: Building Quotes for Insurance
- Structure your Omniscript into three main parts:
- User Input: Collect necessary data for the quote.
- Service Execution: Call services to retrieve products and prices.
- Quote Creation: Utilize the Create Update Quote service to finalize the quote.
Step 7: E-Commerce Omniscript Configuration
- For the digital commerce use case, create steps for:
- Browsing products in a catalog.
- Configuring selected products.
- Verifying items in the cart before checkout.
- Implement a reusable Omniscript for checkout that collects billing and shipping information.
Step 8: Troubleshooting and Debugging
- Use the action debugger to track interactions between the Omniscript and external resources.
- Verify JSON responses to ensure the correct data is being processed.
- Common pitfalls include incorrect parameter submissions leading to service errors.
Conclusion
By following these steps, you can effectively build and troubleshoot Omniscripts for various applications in Salesforce. Practice creating both insurance quotes and e-commerce scenarios to enhance your proficiency. Consider exploring Salesforce’s documentation and community resources for additional insights and advanced configurations.