Optimizing Salesforce Industries Solutions on the Vlocity OmniStudio Platform - Dmitri Khanine - E-Book

Optimizing Salesforce Industries Solutions on the Vlocity OmniStudio Platform E-Book

Dmitri Khanine

0,0
28,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Salesforce Industries brings out-of-the-box solutions tailored to specific industries, making it easy for customers to install, configure, and slash their time-to-value. It stands as one of Salesforce's strategic pillars with the number of installations growing rapidly.
While customizing the out-of-the-box solutions can pose performance challenges, this book provides a fail-safe system with proven best practices, tools, and precise metrics to enhance performance and scalability for efficient outcomes.
Kicking off with an overview of the Salesforce Industries Vlocity platform and OmniStudio, you’ll explore the tools and techniques used to manage code and measure performance. Delving into performance optimization, you’ll uncover methods for improving performance in OmniStudio's Service Layer (Integration Procedures and DataRaptors) and Presentation Layer (OmniScripts and FlexCards). Further, the book will guide you through achieving maximum performance by leveraging best practices in both layers.
By the end of this book, you’ll have mastered the intricacies of Salesforce Industries on the Vlocity OmniStudio Platform, enhancing your skills to navigate and optimize tailored solutions effectively.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 252

Veröffentlichungsjahr: 2024

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Optimizing Salesforce Industries Solutions on the Vlocity OmniStudio Platform

Implementing OmniStudio best practices for achieving maximum performance

Dmitri Khanine

Optimizing Salesforce Industries Solutions on the Vlocity OmniStudio Platform

Copyright © 2024 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Portfolio Manager: Aaron Tanna

Publishing Product Manager: Kushal Dave

Book Project Manager: Deeksha Thakkar

Senior Editor: Aditi Chatterjee

Technical Editor: Vidhisha Patidar

Copy Editor: Safis Editing

Proofreader: Aditi Chatterjee

Indexer: Manju Arasan

Production Designer: Shankar Kalbhor

DevRel Marketing Coordinators: Deepak Kumar and Mayank Singh

First published: March 2024

Production reference: 1280324

Published by

Packt Publishing Ltd.

Grosvenor House

11 St Paul’s Square

Birmingham

B3 1RB, UK

ISBN 978-1-83546-847-0

www.packtpub.com

Contributors

About the author

Dmitri Khanine is a certified Vlocity and OmniStudio developer, trainer, and consultant based in Canada. He has spent the last 7 years of his over 25-year-long IT career focusing exclusively on Salesforce Industries.

Dmitri combines training with hands-on development, creating industry apps with OmniStudio. This keeps his skills sharp and ensures he never runs out of fresh tips, tricks, and trade secrets.

The recipe for Dmitri’s training success is simple. He gives students a complete view of the OmniStudio platform, followed by best practices and anti-patterns, and then takes it a step further by showing an actual percent improvement that each best practice is expected to bring.

“There’s no point in repeating what can be easily found in online documentation in under 5 minutes,” says Dmitri, “It’s the tips and tricks that people are interested in.”

Dmitri is available for a limited number of training, speaking, and consulting engagements and can be contacted at [email protected].

About the reviewers

Sam Lienpanich is a recognized expert in Salesforce OmniStudio, specializing in Communications Cloud, CPQ, and Billing. With a robust background that intersects technology, innovation, and strategic implementation, Sam has dedicated his career to mastering and advancing the capabilities of Salesforce Industries and OmniStudio. His technical acumen and solution-oriented approach have set industry standards, particularly in his roles that span from a pivotal tenure at Oracle, Vlocity, and Salesforce. As the Salesforce Industries Global Lead at Sabio Group, a Premier Salesforce Partner, Sam leads the strategic development and execution of Salesforce Industries solutions, with a particular emphasis on telecommunications companies. He is highly regarded for his leadership in OmniStudio development, where his innovative methods establish benchmarks for scalable, efficient, and transformative solutions. Sam is dedicated to upholding and promoting best practices in OmniStudio development, ensuring that his team consistently delivers superior quality and groundbreaking results in their projects.

I would like to express my appreciation to the author for crafting such an insightful and informative book. Heartfelt thanks to my family for their love and support during this review process. I am also grateful to Sabio Group for providing me with the opportunity to review this book, underscoring their commitment to continuous learning and professional growth.

Rathin Mojumdar has over 24 years of experience as a seasoned Professional Services Leader and CRM professional. Throughout his career, he has successfully led CRM, data, and AI projects across diverse business environments, facilitating companies in achieving enhanced business agility and optimal customer satisfaction, and delivering niche business value propositions with a remarkable return on investment. His focus extends to assisting clients in their digital transformation journey, offering top-notch CRM/Industry Cloud solutions seamlessly integrated with ERP, mobile, social, and various other cloud applications. This integration results in a comprehensive omnichannel experience across both digital and traditional channels. His expertise encompasses a range of specialties, including CRM solutions, digital transformation, cloud architecture, solution design/IT strategy and framework development, managing complex implementations, building and overseeing cross-functional teams, system integration, and the formulation of enablement and transformation roadmaps.

Table of Contents

Preface

Part 1: The Platform Overview

1

Understanding the Vlocity OmniStudio Platform

Technical requirements

What is OmniStudio?

Digital Interaction Platform

The Salesforce Industries Process Library

Digital Experience Layer

Service Management Layer

Developer Experience Layer

Summary

2

A Sample Application

Technical requirements

Hands-on lab – creating an OmniScript

Creating an OmniScript

Adding steps

Creating a DataRaptor

OmniScript preview

Adding a FlexCard

Adding a FlexCard to an OmniScript

Summary

Part 2: Getting to Know the Tools

3

Evaluating the Performance of an OmniStudio Implementation

Technical requirements

Measuring execution times in OmniStudio

Execution times in DataRaptors

Execution times in Integration Procedures

Execution times in OmniScripts

Exploring the OmniStudio Tracking Service

Enabling tracking for OmniStudio

Adding custom fields to event tracking

Collecting stats and errors

Salesforce debug logs

Collecting debug logs in production

Process Profiler in IDX Workbench

Vlocity Error Log

Summary

4

An Introduction to Load Testing

Technical requirements

Why and how to do load testing

General considerations

Salesforce Performance Assistant

Running your load test

Using Selenium for load testing

Load testing with JMeter

Summary

5

Tracking Code Changes and Deployment

Technical requirements

Using the out-of-the-box export and import tools

Exporting Integration Procedures and OmniScripts

Extracting metadata with the Vlocity Build tool

Downloading the Vlocity Build tool

Running the Vlocity Build tool

Exporting Vlocity metadata

Deploying Vlocity metadata

Generating a Vlocity Manifest

Using Salesforce’s SFDX tool

Other OmniStudio configuration management tools

Salesforce Vlocity Integration VS Code extension

IDX Workbench

CI tools

Summary

Part 3: Best Practices for Improving Performance

6

Options for Async Execution

Technical requirements

Why to consider async code execution

Async configuration options for Integration Procedures

Chainable

Queueable Chainable setting

Chain On Step

How to call long-running Integration Procedures from the code

Calling from Apex

Calling from an LWC

Async execution options in Apex

Apex @future annotation

Queueable Apex

Batch Apex

Scheduled Apex

Summary

7

Understanding Caching

Technical requirements

What’s with all the caching?

Manual caching options

Caching in the Salesforce platform

Caching options in DataRaptors

Cache blocks in Integration Procedures

Caching the response of the entire Integration Procedure

Caching with the Lightning Wire service

Custom caching on the client side

Summary

8

Non-Selective Queries and Data Skew

Technical requirements

Case study – when an indexed field performs slower than a non-indexed one

Selective and non-selective queries

Optimizing queries with the Query Plan tool

Understanding data skew

Summary

9

Improving the Performance of the Service Layer

Technical requirements

Client or server side?

DataRaptors or an Integration Procedure?

Integration Procedure or server calls

Comparing relationship notation and multiple extract steps

Using multiple extract steps

Using relationship notation

Boosting performance by trimming the response JSON

DataRaptors

Integration Procedures

How fast the Turbo Extract DataRaptor really is

Summary

10

Improving the Performance of the Presentation Layer

Technical requirements

Performance impact of OmniScript best practices

Performance impact of formulas on OmniScripts

Performance impact of conditional views in OmniScripts

Performance impact of merge fields in OmniScripts

Measuring the performance of the Presentation Layer

Measuring load times with LWC Debug Mode

Measuring performance with Selenium

Consider LWC lifecycle events

Document generation options

Summary

11

DataRaptor Formula Performance Considerations

Technical requirements

How fast are DataRaptor formulas?

The QUERY function or another Extract?

Limiting custom function payload size

Summary

12

OmniStudio Performance Anti-Patterns

Technical requirements

DML, API, and Remote Action calls from Loop Block

Better solutions

Integration Procedure running after an error

Better solutions

Non-selective queries in DataRaptors

Wildcards in Filter criteria

Use of NULL values

Use of EXCLUDES and NOT LIKE operators

Summary

Index

Other Books You May Enjoy

Part 1:The Platform Overview

The first part of this book will provide a high-level overview of Vlocity OmniStudio. It will help drive home the overall vision behind the platform and how the components are designed to work together. This knowledge will make it easier to diagnose problems and improve the performance of your applications.

If you are new to OmniStudio, you will also find a quick hands-on refresher, where you will be able to touch on a lot of OmniStudio’s moving parts, getting ready for the technical chapters ahead.

This part has the following chapters:

Chapter 1, Understanding the Vlocity OmniStudio PlatformChapter 2, A Sample Application

1

Understanding the Vlocity OmniStudio Platform

Let’s start with the 1,000-foot view of Vlocity OmniStudio—the new part of the Salesforce platform that runs all of the Industries Solutions. While you may be familiar with tools such as OmniScripts and DataRaptors, this chapter may still help as it will drive home the overall vision and how the components of the platform are designed to work together, building the foundation for understanding the chapters ahead.

Knowing the building blocks and moving parts of the platform will make it easier to diagnose problems and improve the performance of our OmniStudio apps. This knowledge will help us narrow down the issues to a specific layer, building block, and component and then follow the best practices and techniques designed to be effective in that part of the system.

We will build on this foundation throughout the book while studying layer- and component-specific best practices for improving performance and scalability.

In this chapter, we will cover the following topics:

The OmniStudio platform—the engine that runs Salesforce Industries solutionsThe Process Library—the open repository of the reference solution templatesThe three layers of the OmniStudio Digital Interaction Platform and how they fit togetherHow the existing Salesforce low-code tools, such as Flows, fit with new OmniStudio tools

Let’s start with the big question of what OmniStudio really is.

Technical requirements

To follow along with this chapter, you will need access to an OmniStudio installation. If you don’t have one handy, you can always request your free trial development environment from the Salesforce Developers site, which is (at the time of this writing) available at https://developer.salesforce.com/free-trials. Once on the site, head over to Industry-Based Trials and get yourself a trial org for the industry of your choice. Please refer to our free graphic bundle to download the images used in this chapter and throughout this book. You can download the images from https://static.packt-cdn.com/downloads/9781835468470_ColorImages.pdf

What is OmniStudio?

OmniStudio is the engine behind the customized, industry-specific offerings that run on the new part of the Salesforce platform called Salesforce Industries. It was originally built by Vlocity, an independent company that was acquired by Salesforce in 2020. Founded in 2014, Vlocity pioneered the concept of Industry Cloud on the Salesforce CRM platform, quickly gaining momentum and making it to the Forbes Cloud 100 list for three consecutive years in 2017, 2018, and 2019.

As of the time of this writing, Salesforce Industries caters to 15 industries. Just three years ago, before the acquisition of Vlocity, it served only six. Then, nine new industries were recently added, sharing the OmniStudio toolset, reusing existing and adding new industry-specific components:

Figure 1.1 – The acquisition of new industries over three years by the Salesforce Industries platform

While each industry has its common business processes, the OmniStudio platform along with the Industries Data Model offers the tools and components that can support all types of industries, saving new and existing Salesforce Industries customers months and years of development.

Based on independent studies, the use of OmniStudio tools alone may result in a boost of over two times the productivity as compared to custom development.

To learn more about productivity boosts, you may want to read this article by Konstantin Sitkin, published on SalesforceBen: Salesforce Industries vs. Custom Salesforce Development: Benefits of OmniStudio (https://www.salesforceben.com/salesforce-industries-vs-custom-salesforce-development/)

Let’s now look at the platform components that enable this kind of productivity boost.

Digital Interaction Platform

The core OmniStudio components such as OmniScripts, FlexCards, DataRaptors, and Integration Procedures, along with other tools such as Configure, Price, Quote (CPQ) and Vlocity Industry Services, all form the Digital Interaction Platform.

Each of the specific industry solutions gets most of the Digital Interaction Platform tools built in. They come with the industry’s most common business processes already implemented and ready to be customized and deployed. For instance, the Public Sector Cloud comes pre-built with Permits and Inspections and the Energy & Utilities Cloud comes with Utility Self Service and Clean Energy Programreference implementations.

The following diagram shows the building blocks and core components of the Digital Interaction Platform:

Figure 1.2 – The Digital Interaction Platform diagram

Salesforce Industries also shares its Process Library — an open GitHub repository, where clients can download samples and complete reference implementations.

The Salesforce Industries Process Library

The Salesforce Industries Process Library contains ready-to-use, high-level business process reference implementations. These can be easily downloaded, configured, and customized to fit business needs.

Let’s take a quick look at the steps involved in downloading a business process from the Salesforce Industries Process Library.

Begin by going to the Process Library that is currently available at

https://github.com/Salesforce-Industries-Process-Library.

Then proceed to your industry’s repository:

Figure 1.3 – An overview of the Salesforce Industries Process Library

Each of the business processes available comes with a PDF describing the solution that usually includes the flowchart, details of the reference implementation, and the steps required to get it up and running in your org.

The following is the flowchart that comes with Apply for Business Authorization reference implementation that is available for Public Sector Cloud customers:

Figure 1.4 – A flowchart with the reference implementation of the Apply for Business Authorization process

The following figure shows a list of the OmniStudio components that are included with this specific downloadable process:

Figure 1.5 – An overview of the Process Library’s process package content for Apply for Business Authorization

Note

The Salesforce Industries Process Library used to be called the Vlocity Process Library (VPL) and the downloadable processes and reference implementations are sometimes called the VPLs.

Install the OmniStudio DataPack of the Process by going to the OmniScripts page and clicking the Import button, then follow the steps in Configuration Requirements in the reference process’s PDF.

(We have a step-by-step demo of downloading, installing, configuring, and running a VPL on this book’s companion site. Head over to https://maximumvlocity.com/ to see it.)

And now that we’ve seen how easy it is to add reference implementations to the OmniStudio Digital Interaction Platform, let’s look under the hood to see the components that make it all possible.

Digital Experience Layer

The Digital Experience Layer (DEL) contains two OmniStudio components: OmniScripts and FlexCards. The following diagram shows the building blocks and core components of the DEL:

Figure 1.6 – Diagram of the Digital Experience Layer

These point-and-click tools make it easy to quickly build rich user interactions, guide users through complex business processes, and display contextual information and context-specific actions.

OmniScripts

OmniScripts are low-code, visual, point-and-click tools that allow developers to quickly create guided interactions, where customers are taken through a sequence of screens as required to complete a business process. OmniScripts come with a rich library of user interface (UI) components and support different and easily customizable looks and feels, step charts, document generation, and other features that are not currently found in Salesforce Flows.

All steps and UI elements are also mapped to JSON, which makes them developer-friendly, and it is easy to load, save, and manipulate the data using other OmniStudio tools. The following screenshot shows a simple OmniScript in the Preview mode with its corresponding Data JSON view:

Figure 1.7 – An overview of a sample OmniScript Data JSON

Why would Salesforce support OmniScripts when Flows have been around longer?

While OmniScripts currently offer more control over the user experience through the Step Chart, input validation, JSON mapping, themes, and other features such as PDF generation, Flows have been around longer. Why would Salesforce support OmniScripts over Flows?

Can it be because the OmniScript features will be rolled into Flows? Yes, according to what David Schmaier, Chief Product Officer at Salesforce, said at True to the Core ’23. He said:

These (the Flows and OmniScripts) will become the same, but they’re not going to become one immediately.

FlexCards

OmniStudio FlexCards allow developers to quickly build interactive tiles or Infolet Cards containing relevant information and context-specific actions. These tiles can then be assembled into consoles or simply added to Salesforce object pages, external sites, dedicated console screens, OmniScripts, and more. FlexCards, once out of the FlexCard Designer tool, are rendered as Lightning Web Components (LWCs), so they are easy to integrate pretty much everywhere an LWC can be placed.

The following example illustrates how a simple arrangement built from just four FlexCards can show a lot of relevant information about an insurance policyholder along with relevant, context-sensitive actions:

Figure 1.8 – An overview of a sample FlexCard layout

Here’s an example of using FlexCards as LWCs on an org’s Account page:

Figure 1.9 – An overview of FlexCards on the Account page

And this is how the previous Weather FlexCard looks in the FlexCard Designer tool:

Figure 1.10 – An overview of a FlexCard Designer

And that is it for the DEL. Now let’s look at the Service Management Layer.

Service Management Layer

The Service Management Layer (SML) contains the OmniStudio SML as well as the Industries SML components. The following diagram shows the building blocks and core components of the SML:

Figure 1.11 – Diagram of the Service Management Layer

The OmniStudio SML is built from two powerful data tools: DataRaptors and Integration Procedures. The Industries SML contains industry-specific components such as the Enterprise Product Catalog (aka Salesforce Industries CPQ), Calculation Matrices, Calculation Procedures, and the Salesforce Industries Service Catalog.

DataRaptors

OmniStudio DataRaptors provide an intuitive point-and-click extract, transform, and load (ETL) tool that allows the developer to easily manipulate and move the data between various sources and destinations. The following DataRaptor maps values from an input JSON blob to an Account Object, where the value of the AccountNumber node will be saved. The JSON blob can be supplied from different sources — for example, from the Account step of an OmniScript. The AccountNumber JSON node is mapped to the AccountNumber field of the Salesforce Account object:

Figure 1.12 – An overview of a sample DataRaptor

There’s a wealth of options that can be configured for mapping, default values, formulae, and more to facilitate powerful data manipulation and transformation with just a few clicks.

Integration Procedures

OmniStudio Integration Procedures provide intuitive point-and-click server-side orchestration tools where you can build more complex logic by stringing together DataRaptors, web service callouts, document generation, and more.

The following screenshot shows the Design View of an Integration Procedure that retrieves a complex set of information related to the client application:

Figure 1.13 – An overview of a sample Integration Procedure

In addition to hosting functional blocks, Integration Procedures can implement their own logic, conditions, and loops. They can also use DataRaptors to implement data, JSON operations, and more, providing an intuitive point-and-click tool for serious server-side processing and data manipulation.

Salesforce Industries CPQ

Salesforce Industries CPQ is one of the core components in the Communications, Media, Energy & Utilities, and other industry clouds. It allows for extremely complex business rules to be applied for generating quotes, creating and fulfilling orders, managing promotions, and more. It also comes with a set of performance-enhancing services and is extensively customizable. Industries CPQ supports both B2B and B2C processes.

The following screenshot shows the