Blogs

How To Lunch Flyout In Flexcard With Button In OmniStudio Salseforce.

FlexCards in OmniStudio allow you to display dynamic, contextual data in a visually appealing way. Sometimes, you may want to launch a child FlexCard from a parent FlexCard using a button click. This is achieved using the Flyout action, which can open a child card as a modal or side panel. In this article, we will explain step by step how to create a FlexCard with a button that launches a Flyout to display another FlexCard. Step 1: Create a Child FlexCard The first step is to create a child FlexCard that will be displayed when the Flyout action is triggered. Open FlexCard Designer and create a new FlexCard Provide a Name and Description for the child FlexCard Click Save to create the card Creat a Flexcard & Save Step 2: Configure Data Source for the Child FlexCard Next, configure the Data Source to fetch data for the child card. Go to the Setup tab Select Data Source Type Write a SOQL query to fetch the required records from Salesforce Click Save & Fetch Once saved, the records will start appearing in the FlexCard preview. Data Source & write SOQL Query As soon as we click on Save and Fetch buttons, the records start getting displayed. Then we click on the Build Options area and drag and drop the selected fields to the canvas, which displays all the records. All Records Show in Dispaly Then we create a parent flexchar and create an action button in it. We create a Flex card with proper Name & Description. And  Drag & Drop  a Action Button. And we are going to action and select action type = flyout, flyout type=Child Card, flyout = Child Card Name, Open flyout type=Modal, Channel Name=Close_modal File Action & Attributes Then we activate the flex card. Fill Action & Attributes Note :-When selecting a Flyout make sure that the componentis Activated and Child Card is enabled (If it is a Flexcard). If the component is not activated or the Child card is not enabled, then the flyout will not display that component in the dropdown list. Click Button Once the user clicks on the “More Details” button, it will launch the flyout modal and display the fields. Show All Details Step 3: Build the Child FlexCard UI Now it’s time to display the fetched data on the child FlexCard: Go to the Build Options area Drag and drop the desired fields onto the canvas Arrange them to display all necessary information At this stage, the child FlexCard is ready with its data and layout. Step 4: Create a Parent FlexCard Now, create a parent FlexCard that will contain the button to launch the Flyout. Create a new FlexCard with a proper Name and Description Drag and drop an Action Button onto the parent FlexCard canvas Step 5: Configure the Action Button to Launch Flyout Configure the button to open the child FlexCard: Select the Action Type as Flyout Set the Flyout Type to Child Card Choose the Child Card Name you created earlier Set the Open Flyout Type as Modal Optionally, set Channel Name to Close_modal if you want to control modal closing behavior Fill in any additional Action Attributes Step 6: Activate the FlexCards Before the Flyout will work: Ensure that both the parent and child FlexCards are activated Make sure the child card is enabled in the FlexCard component settings Note: If the component is not activated or the child card is disabled, it will not appear in the Flyout dropdown list. Step 7: Preview and Test the Flyout Once everything is set up: Preview the parent FlexCard Click on the “More Details” button (or the button you configured) The child FlexCard will open in a Flyout modal, displaying the fields you configured This allows users to see detailed information without navigating away from the main card. Best Practices Always give a meaningful name to your child FlexCard for clarity Ensure the SOQL query is optimized to avoid slow loading Test modal behavior on different devices to ensure responsiveness Use channels if you want to control multiple modal interactions Keep child FlexCard layout simple for quick loading Use Cases Using Flyouts in FlexCards is ideal for: Displaying detailed account or contact information Showing related records without leaving the parent card Quick approval or review actions Enhancing user experience in dashboards or service consoles Conclusion Launching a Flyout in FlexCard using a button is a powerful OmniStudio feature that allows nested, contextual data display. By configuring a parent FlexCard with an Action Button and linking it to a child FlexCard, users can access additional details quickly, improving both usability and efficiency. With proper setup of Data Sources, Flyout configuration, and activation, this approach can enhance any OmniStudio interface with dynamic, interactive data views.

How To Lunch Flyout In Flexcard With Button In OmniStudio Salseforce. Read More »

How to Pass Data Parent FlexCard to Child FlexCard

How to Pass Data from Parent FlexCard to Child FlexCard in OmniStudio In this post, we will learn how to pass data from a Parent FlexCard to a Child FlexCard in OmniStudio (Vlocity). We will create two FlexCards—one parent and one child—where the child FlexCard queries Account records and displays the data inside the parent FlexCard. This approach is commonly used to build modular, reusable, and dynamic UI components in Salesforce OmniStudio. Ways to Pass Data to a Child FlexCard in Vlocity There are two primary ways to pass data from a parent FlexCard to a child FlexCard: 1. Using Data Nodes Data Nodes are used to query Salesforce data and pass the results to a child FlexCard. Data Nodes fetch records using SOQL, DataRaptors, or Integration Procedures The queried data is automatically available to the child FlexCard Best suited when the child FlexCard needs record-based or structured data 2. Using Attributes Attributes act as input parameters passed from the parent FlexCard to the child FlexCard. Attributes enable dynamic customization Specific values can be passed directly to the child FlexCard Useful when the child FlexCard needs filtered or contextual data from the parent Using attributes allows us to pass specific values from the parent FlexCard to the child FlexCard efficiently. Step 1: Create the Child FlexCard to Query Account Data In this step, we create the child FlexCard that will query Account records. Create a new FlexCard with a proper Name and Description Configure a Data Source (SOQL, DataRaptor, or Integration Procedure) Query the required Account fields such as Name, Phone, or Industry Save and Fetch the data Drag the required fields from the Build section to the canvas This child FlexCard will be responsible for displaying Account-related information. In Child FlexCard Step 2: Enable Child Card Settings in the Child FlexCard To establish a parent-child relationship: Open the child FlexCard settings Set “Is Child Card” = true Save and Activate the FlexCard This step is mandatory; without enabling the child card option, the FlexCard cannot be embedded inside a parent FlexCard. In Parent Card On Parent Setup Panel On parent flexcard preview tab  On preview tab Step 3: Configure Parent FlexCard Now, create the parent FlexCard: Create a new FlexCard with a proper name and description If required, define Attributes that will be passed to the child FlexCard These attributes can include Account Name, Record Id, or other parameters Step 4: Access Parent Data in Child FlexCard To access data from the parent FlexCard inside the child FlexCard, use the following syntax: {Parent.attributeName}   Replace attributeName with the actual attribute or data node name defined in the parent FlexCard. This allows the child FlexCard to dynamically use values coming from the parent. Step 5: Add Child Card Component to Parent FlexCard In the parent FlexCard: Go to the Build section Drag and drop the CHILD CARD component onto the canvas Select the child FlexCard name Map attributes or data nodes as required Once configured, the child FlexCard will render inside the parent FlexCard and display Account data accordingly. Conclusion Passing data from a parent FlexCard to a child FlexCard is a powerful feature in OmniStudio that helps build scalable and reusable UI components. By using Data Nodes or Attributes, you can control how data flows between FlexCards and create flexible user experiences. This pattern is especially useful when working with Account details, related records, or contextual views within Salesforce.

How to Pass Data Parent FlexCard to Child FlexCard Read More »

How To Use Flexcard Context Variables(salesforce)

FlexCards are one of the most powerful UI components in Salesforce OmniStudio. They allow developers to build dynamic, data-driven user interfaces with minimal code. One of the key concepts that makes FlexCards flexible and reusable is the use of context variables. In this article, we will take a deep dive into FlexCard context variables, understand what they are, why they are important, and how to use them effectively in real-world Salesforce implementations. Understanding Context Variables in Salesforce In Salesforce, context variables are variables that store information related to the current execution context. These variables help determine how a component behaves, what data it retrieves, and how that data is displayed. Context variables are widely used across Salesforce features such as: OmniStudio FlexCards OmniScripts DataRaptors Integration Procedures Flows and Apex Within FlexCards, context variables act as connectors between: Data sources and UI components Parent and child FlexCards Runtime parameters and backend logic All context variables in FlexCards are case-sensitive, and incorrect casing can result in blank data or unexpected behavior. Why Context Variables Are Important in FlexCards Context variables allow FlexCards to: Dynamically adapt based on the current record Reuse the same FlexCard across multiple objects Pass data between parent and child components Control data queries without hardcoding values Improve maintainability and scalability Without context variables, FlexCards would be static and tightly coupled to specific records or objects. Types of Context Variables Available in FlexCards FlexCards support several global context variables that can be accessed anywhere within the card, including data sources, actions, and UI elements. Let’s explore each one in detail. 1. Label Context Variable What Is the Label Variable? The Label context variable is used to reference Salesforce Custom Labels inside a FlexCard. Custom labels help avoid hard-coded text and support localization. Syntax {Label.LabelName}   How It Works When a FlexCard is rendered, Salesforce retrieves the value of the custom label and displays it wherever the variable is used. When to Use Display static instructional text Support multi-language UI Maintain consistency across multiple FlexCards Using labels ensures that content changes do not require FlexCard edits. 2. Params Context Variable What Is Params? The Params variable stores parameters passed to the FlexCard at runtime. These values may come from: Test parameters in the FlexCard preview Parent components Navigation actions Embedded contexts Syntax {Params.parameterName}   Example {Params.Id}   Although {Params.Id} can return a record identifier, Salesforce recommends using {recordId} for accessing the current record context. Use Cases Passing search parameters Dynamic filtering Controlling behavior during preview 3. Parent Context Variable What Is Parent? The Parent context variable is used only inside child FlexCards. It allows the child card to reference attributes defined on the parent FlexCard. Syntax {Parent.attributeName}   Example {Parent.AccountId}   This retrieves the AccountId attribute defined on the parent FlexCard. Important Rules The child FlexCard must have Is Child Card = true Attributes must be explicitly defined on the parent The Parent variable cannot access undeclared attributes This mechanism enables strong parent-child communication without duplicating data queries. 4. recordId Context Variable What Is recordId? The recordId variable represents the current Salesforce record context in which the FlexCard is being used. Syntax {recordId}   Why recordId Is Recommended Salesforce strongly recommends using {recordId} instead of {Params.Id} because: It is always available in record-based contexts It improves clarity and consistency It reduces dependency on manually passed parameters Common Use Case When using a DataRaptor to fetch related records: Key: AccountId Value: {recordId} For previewing: Add a test parameter with Key: recordId Value: a valid Salesforce record Id 5. records Context Variable What Is records? The records variable holds all records returned by a data source, such as: SOQL queries DataRaptors Integration Procedures Syntax Examples Get all records: {records}   Get the first record: {records[0]}   Get a field from the first record: {records[0].Name}   Why records Is Important The records variable enables: Iteration through data lists Conditional rendering Display of dynamic datasets Access to individual records without extra queries Understanding records is essential for building data-rich FlexCards. Best Practices for Using Context Variables Always verify case sensitivity Prefer {recordId} for record context Define parent attributes explicitly Use labels instead of hard-coded text Test with real data using test parameters Avoid overloading child FlexCards with multiple queries Conclusion Context variables are the backbone of dynamic behavior in FlexCards. They allow developers to build reusable, scalable, and intelligent UI components that respond to real-time data and user context. By mastering variables like Label, Params, Parent, recordId, and records, you gain full control over how data flows through your FlexCards and how users experience your OmniStudio applications. A solid understanding of context variables is essential for anyone working with Salesforce OmniStudio, FlexCards, DataRaptors, and Integration Procedures.

How To Use Flexcard Context Variables(salesforce) Read More »

How to use Response Action In Integration

Integration Procedures play a critical role in Salesforce OmniStudio by enabling data exchange between Salesforce, external systems, and OmniScripts. One of the most important elements inside an Integration Procedure is the Response Action, which controls how response data is captured, transformed, and sent back to an OmniScript or FlexCard. In this article, we will learn how to use Response Action in an Integration Procedure, how data flows through it, and how it is finally returned to an OmniScript. Why Response Action Is Important When an Integration Procedure interacts with: External APIs Salesforce objects DataRaptors Other integration steps it always produces a response. The Response Action determines: What data is captured from the response How the response is transformed What data is sent back to OmniScript Whether full or partial data is returned Without a Response Action, OmniScript cannot reliably consume data from the Integration Procedure. Sending Integration Procedure Data to OmniScript The basic flow looks like this: OmniScript calls an Integration Procedure Integration Procedure executes its steps Response Action captures and maps response data Data is sent back to OmniScript This makes Response Action the bridge between Integration Procedures and OmniScripts. Step 1: Adding Response Action in Integration Procedure Design the Integration Procedure Open OmniStudio → Integration Procedures Open or create an Integration Procedure Add your required integration steps (DataRaptor, HTTP Action, etc.) Configure the Response Action Drag a Response Action into the Integration Procedure Place it after the integration step whose data you want to return This defines what happens before the Integration Procedure completes The Response Action ensures the response is captured and prepared for output. Response Action Configuration Key configuration options include: Return Full Data JSON When set to True, the entire response JSON is returned Useful for debugging or when OmniScript needs all data Send JSON Path Used to send only a specific node from the response Send JSON Node Allows selection of a specific response node for downstream steps If Return Full Data JSON is enabled, all response data is visible in the Preview tab. Response Action In Integration Procedure Execute Integration Procedure Go to the Preview tab Click Execute Review the response output This confirms whether the Response Action is correctly configured. On Preview Tab Step 2: Using Send/Response Transformations Understanding Send/Response Transformations Send/Response Transformations define: What data is sent into the Integration Procedure What data is passed between steps What data is returned to OmniScript They allow precise control over JSON structures. Send JSON Path in Response Action If you want to pass only a specific part of the response to the next step or OmniScript, configure: Send JSON Path in the Integration Step Send JSON Node in the Response Action Example Response structure: {   “result”: {     “data”: {       “Id”: “001xx”,       “Name”: “Test Account”     }   } }   Configuration: Send JSON Path: $.result Send JSON Node: data This sends only the data node forward. Passing Data to OmniScript From the Response Action: All required data is passed back to OmniScript OmniScript can consume this data using: Integration Procedure Action JSON Path mappings Set Values elements Using Set Values in Response Action A common practice is: Create Set Values Map response data to custom output nodes Return only structured, required values This avoids sending unnecessary data to OmniScript.  Note :– We create a setvalues and pass data in response action. In Response Action On Preview Tab After Click Execute   On Preview Tab Step 3: Additional Output Response Configuration What Is Additional Output Response? Additional Output Response allows you to define custom output nodes that OmniScript will receive from the Integration Procedure. Return Only Additional Output When this option is set to True: OmniScript receives only the defined additional output Full response JSON is excluded Payload becomes cleaner and easier to manage This is recommended for production implementations. Defining Additional Output You can specify: Individual fields Custom objects Structured JSON nodes These outputs are explicitly mapped and returned to OmniScript. How OmniScript Consumes the Response In OmniScript: Drag an Integration Procedure Action Map inputs using Extra Payload Capture response using Response JSON Path Use data in: Text blocks Decision elements Set Values Navigation logic This enables real-time UI updates and backend interactions. In Response Action On Preview Tab After Click On Execute   On Preview Tab Best Practices for Response Action Always use a Response Action when returning data Avoid returning full JSON unless necessary Use Send JSON Path to control payload size Use Set Values for clean output structures Enable Return Only Additional Output for production Test Integration Procedures using Preview before OmniScript integration Conclusion The Response Action is a core component of Integration Procedures in OmniStudio. It ensures that response data is properly captured, transformed, and delivered to OmniScript in a structured and reliable manner. By understanding how to configure Response Actions, Send/Response Transformations, and Additional Output Responses, you can build scalable, maintainable, and efficient integrations within Salesforce OmniStudio. Mastering this concept is essential for anyone working with OmniScripts, Integration Procedures, DataRaptors, and FlexCards.

How to use Response Action In Integration Read More »

How to use loop in apex Salesforce

Loops are a fundamental concept in Apex programming that allow developers to execute a block of code repeatedly until a specific condition is met. In Salesforce Apex, loops are commonly used to process records from SOQL queries, collections like lists and maps, and bulk data operations. In this article, we will learn how to use loops in Apex, explore different types of loops available, and understand best practices for using them efficiently in Salesforce. Why Loops Are Important in Apex Salesforce enforces strict governor limits, especially when dealing with database operations. Loops help developers: Using loops correctly is critical for writing bulk-safe Apex code. Types of Loops in Apex Apex supports the following types of loops: Let’s explore each one with examples and use cases. 1. For Loop in Apex The for loop is used when you know exactly how many times the loop should execute. Syntax for(Integer i = 0; i < 5; i++) {     System.debug(i); } How It Works Use Case 2. For-Each Loop in Apex The for-each loop is the most commonly used loop in Salesforce because it works efficiently with collections. Syntax List<Account> accList = [SELECT Id, Name FROM Account LIMIT 10]; for(Account acc : accList) {     System.debug(acc.Name); } Why It’s Preferred Best Use Case SOQL For Loop (Best Practice) Salesforce recommends using SOQL for loops for large datasets. Syntax for(Account acc : [SELECT Id, Name FROM Account]) {     System.debug(acc.Name); } Advantages 3. While Loop in Apex A while loop runs as long as the specified condition remains true. Syntax Integer count = 0; while(count < 5) {     System.debug(count);     count++; } Use Case Caution Always ensure the condition becomes false; otherwise, it can result in an infinite loop. 4. Do-While Loop in Apex The do-while loop executes the code block at least once, even if the condition is false. Syntax Integer num = 0; do {     System.debug(num);     num++; } while(num < 5); Key Difference Using Loops with Maps Maps are frequently used in Apex for key-value data processing. Example Map<Id, Account> accMap = new Map<Id, Account>(     [SELECT Id, Name FROM Account LIMIT 5] ); for(Id accId : accMap.keySet()) {     System.debug(accMap.get(accId).Name); } Loops in Triggers (Bulk-Safe Example) Triggers always handle multiple records, so loops are mandatory. Example trigger AccountTrigger on Account (before insert) {     for(Account acc : Trigger.new) {         acc.Description = ‘Created via Trigger’;     } } This ensures: Common Mistakes to Avoid Best Practices for Using Loops in Apex Conclusion Loops are an essential building block in Apex programming. Whether you are working with triggers, classes, batch jobs, or integrations, understanding how to use loops correctly helps you write efficient, scalable, and governor-limit-safe code. By mastering for loops, for-each loops, while loops, and do-while loops, you can confidently handle complex data processing in Salesforce.

How to use loop in apex Salesforce Read More »

How to Create an Apex Class in Salesforce

Apex is Salesforce’s proprietary, strongly typed programming language used to execute server-side logic. Apex classes allow developers to extend Salesforce functionality by implementing business logic, integrations, triggers, controllers, and batch processing. In this article, we will learn how to create an Apex class in Salesforce using two common methods: Both approaches are widely used depending on your development workflow. What Is an Apex Class? An Apex class is a blueprint that contains: Apex classes are used in: Creating Apex classes correctly is essential for building scalable Salesforce applications. Method 1: Create an Apex Class Using Developer Console This method is simple and best suited for beginners or quick development tasks. Step 1: Log in to Salesforce Step 2: Access Developer Console Step 3: Create a New Apex Class Step 4: Write Apex Code Once the editor opens, write your Apex logic.Below is a simple example: public class MyApexClass {     public String greeting {         get {             return ‘Hello, Salesforce!’;         }     } } This example demonstrates: Step 5: Save the Apex Class Step 6: Compile and Check for Errors Step 7: Use the Apex Class Once compiled successfully, the Apex class can be used in: Method 2: Create an Apex Class Using Visual Studio Code (VS Code) This is the recommended method for professional Salesforce development, especially when working with source control and multiple developers. Step 1: Install Visual Studio Code Step 2: Install Salesforce Extensions This extension provides: Step 3: Open Your Salesforce Project Step 4: Create a New Apex Class Step 5: Write Apex Code VS Code will automatically generate a basic class structure.You can now add your logic inside the class. Step 6: Save the Apex Class Step 7: Deploy Apex Class to Salesforce You can deploy the Apex class using: Once deployed, the class becomes available in your Salesforce org. Best Practices for Creating Apex Classes Conclusion Creating an Apex class is a foundational skill for Salesforce developers. Whether you use the Developer Console for quick tasks or Visual Studio Code for enterprise development, understanding both methods gives you flexibility and control. By mastering Apex classes, you unlock the ability to build powerful business logic, integrations, and custom automation within Salesforce.

How to Create an Apex Class in Salesforce Read More »

How to Make Set Value and Response Action in IP.

  Integration Procedures (IP) in Salesforce OmniStudio are used to process, transform, and exchange data between Salesforce, OmniScripts, FlexCards, and external systems. Two very important elements inside an Integration Procedure are Set Values and Response Action. In this article, we will learn how to use Set Values and Response Action in an Integration Procedure, why they are needed, and how they work together to send clean, structured data to OmniScript or FlexCard. Why Set Values and Response Action Are Important Set Values helps you create or modify data inside the Integration Procedure Response Action controls what data is returned to OmniScript or FlexCard Together, they help avoid sending unnecessary or unstructured data They improve performance, readability, and maintainability These elements are commonly used in real-time integrations and UI-driven processes. What Is Set Values in Integration Procedure? Set Values is used to: Create new JSON nodes Assign values to variables Transform response data Prepare output data for OmniScript or FlexCard Set Values does not fetch data; it only manipulates existing data. What Is Response Action in Integration Procedure? Response Action defines: What happens at the end of the Integration Procedure Which data is sent back to the calling component Whether full JSON or selected output is returned Without a Response Action, data cannot be reliably consumed by OmniScript. Step 1: Create an Integration Procedure Go to OmniStudio → Integration Procedures Create or open an Integration Procedure Add required steps (DataRaptor, HTTP Action, etc.) Save the Integration Procedure Step 2: Use Set Values in Integration Procedure Add Set Values Element Drag Set Values onto the Integration Procedure canvas Place it after the step whose data you want to transform Configure Set Values Inside Set Values: Define Key (output field name) Define Value (source data path or static value) Example If your response contains: response.Account.Name You can map it as: Key: AccountName Value: {response.Account.Name} This creates a clean output node called AccountName. Why Use Set Values? To rename fields To combine multiple values To remove unnecessary nested JSON To prepare data for Response Action Step 3: Add Response Action in Integration Procedure Add Response Action Drag Response Action to the canvas Place it at the end of the Integration Procedure Configure Response Action Key configuration options: Return Full Data JSON True: returns entire response False: returns only mapped output Send JSON Path Specifies which node to send forward For clean output, keep Return Full Data JSON set to False. Step 4: Configure Additional Output Response What Is Additional Output Response? Additional Output Response allows you to explicitly define what data is returned. How to Configure Enable Additional Output Response Map keys from Set Values Choose only required fields Return Only Additional Output Set Return Only Additional Output = True This ensures only clean, required data is returned Recommended for production implementations Step 5: Preview and Test Integration Procedure Go to the Preview tab Provide test input parameters Click Execute Verify output JSON structure This helps confirm Set Values and Response Action are working correctly. How OmniScript Uses This Data In OmniScript: Add an Integration Procedure Action Pass input using Extra Payload Capture response using Response JSON Path Use data in: Text blocks Set Values Decisions Navigation logic Best Practices Always use Set Values before Response Action Avoid returning full JSON unless required Use meaningful key names Enable Return Only Additional Output Test IP independently before using in OmniScript Keep output lightweight and structured Common Mistakes to Avoid Skipping Response Action Returning unnecessary full JSON Incorrect JSON path mapping Not testing with real input values Overloading Integration Procedure with logic Conclusion Set Values and Response Action are essential building blocks in Integration Procedures. Set Values prepares and structures the data, while Response Action ensures only the required data is sent back to OmniScript or FlexCard. Mastering these two elements helps you build clean, efficient, and scalable OmniStudio integrations.

How to Make Set Value and Response Action in IP. Read More »

How to Embed OmniScript in Another OmniScript in Salesforce

OmniScript is a powerful declarative tool in Salesforce Industries (Vlocity) that helps create guided user experiences. One of its most useful features is the ability to embed one OmniScript inside another OmniScript, making processes reusable, modular, and easier to maintain. In this article, we will explore how to embed an OmniScript in another OmniScript, understand the concept of Reusable OmniScripts, and walk through the step-by-step implementation. What Is a Reusable OmniScript? A Reusable OmniScript is an OmniScript that is designed to be called or embedded inside another OmniScript. Instead of building the same logic repeatedly, you can create one OmniScript and reuse it across multiple parent OmniScripts. Benefits of Reusable OmniScripts Reduces duplicate development Improves consistency across processes Simplifies maintenance and updates Speeds up OmniScript development Once an OmniScript is marked as reusable, it becomes callable from other OmniScripts. Use Case for Embedding an OmniScript Embedding OmniScripts is useful when: You have common data collection sections (e.g., address, contact info) You want to reuse validation or business logic Multiple OmniScripts follow the same sub-process You want a modular and scalable OmniScript design Step 1: Create a Reusable OmniScript The first step is to create the OmniScript that you want to reuse. Steps to Create a Reusable OmniScript Go to Setup in Salesforce. Search for OmniScript. Click New OmniScript. Fill in required details such as: Type Subtype Language In the Setup section, check the Reusable checkbox. Save the OmniScript. Step 2: Design the Reusable OmniScript After creating the reusable OmniScript, design its structure. Best Practices Add a Text Block, Input Field, or any component to identify the OmniScript Keep it focused on a single responsibility Avoid unnecessary navigation elements For example, you may add a Text Block with a value like: “This is Reusable/Child OmniScript” This helps identify the reusable OmniScript when it is embedded. Step 3: Activate the Reusable OmniScript Activation is mandatory before the OmniScript can be used elsewhere. Activation Steps Go to the Build section of the reusable OmniScript. Validate the OmniScript to ensure there are no errors. Click Activate. Once activated, the OmniScript becomes available to embed in a parent OmniScript Step 4: Create the Parent OmniScript Now, create the OmniScript where you want to embed the reusable OmniScript. Steps to Create Parent OmniScript Go to Setup → OmniScript. Click New OmniScript. Enter the required details. Save and open the OmniScript in Build mode. This OmniScript will act as the Parent OmniScript. Step 5: Embed the Reusable OmniScript This is the key step where the reusable OmniScript is embedded into the parent OmniScript. Steps to Embed OmniScript Open the Build section of the Parent OmniScript. Scroll down to the Reusable OmniScript section. Locate the reusable OmniScript by its Name. Drag and drop the reusable OmniScript onto the canvas. Once dropped, the child OmniScript becomes part of the parent OmniScript flow. Step 6: Map and Use Data from Child OmniScript When a reusable OmniScript is embedded: All data collected in the child OmniScript becomes available to the parent OmniScript Data is automatically passed up to the parent data JSON You can now: Display child OmniScript values in the parent OmniScript Use the data for integration procedures Apply validations or conditions based on child data Step 7: Activate and Preview the Parent OmniScript After embedding the reusable OmniScript: Validate the Parent OmniScript. Click Activate. Click Preview. In preview mode, you will see the embedded OmniScript content displayed inside the parent OmniScript. For example, if the child OmniScript contains the text: “This is Reusable/Child OmniScript” It will appear within the parent OmniScript, confirming that embedding was successful. Key Points to Remember Reusable OmniScript must be activated before embedding Child OmniScript data automatically flows to the parent Keep reusable OmniScripts simple and focused Avoid navigation elements like Next/Previous in child OmniScripts Test both child and parent OmniScripts thoroughly Conclusion Embedding one OmniScript inside another OmniScript is a powerful feature that promotes reusability, modular design, and efficiency in Salesforce Industries. By creating reusable OmniScripts and embedding them into parent OmniScripts, you can build scalable guided processes with minimal effort. This approach not only saves development time but also ensures consistency across business workflows. With proper design and activation, reusable OmniScripts become an essential building block for advanced OmniScript implementations.

How to Embed OmniScript in Another OmniScript in Salesforce Read More »

How To Use SetValues In Integration Procedure

Integration Procedures (IPs) in Salesforce Industries are used to process data efficiently without writing code. One of the most commonly used elements inside an Integration Procedure is SetValues. It allows you to manipulate, merge, calculate, and transform data before sending it to the output or another system. In this article, we will learn how to use SetValues in an Integration Procedure, how to merge element values, perform calculations, concatenate fields, and finally display the result using Response Action. What Is SetValues in Integration Procedure? SetValues is an element in Integration Procedure that allows you to: Assign static values Merge values from different elements Perform calculations using formulas Concatenate multiple fields Retrieve values from arrays or lists It helps prepare and structure data in the required format before sending it to OmniScript, FlexCard, or an external system. Use Case of SetValues SetValues is commonly used when: You need to combine multiple input fields You want to format output data Calculations are required without Apex Data needs to be reused in another SetValues Final output must be shown in Preview or Response Step 1: Create an Integration Procedure The first step is to create an Integration Procedure. Steps: Go to Setup. Search for Integration Procedure. Click New. Enter required details such as: Name Type Subtype Language Save the Integration Procedure. Once created, open it in Designer mode. Step 2: Add SetValues to the Structure Panel Now, add the SetValues element to the Integration Procedure. Steps: Open the Structure Panel. Drag and drop SetValues into the Integration Procedure flow. Rename it meaningfully (for example: SetValues_1). This SetValues element will be used to define and manipulate data values. Step 3: Configure Element Value Mapping Inside SetValues, you define how values are assigned or merged. Element Value Map Configuration: Click on the SetValues element. Go to the Element Value Map section. Click Add New Value. Define: Element Name (output variable) Value (static value, merge field, or formula) This mapping helps transfer data from input JSON or other elements into new variables. Step 4: Perform Operations Using SetValues SetValues supports multiple operations that can be performed easily. Common Operations in SetValues Merge Fields You can merge values from input or previous elements using merge syntax. Example: %Input:FirstName%   Calculations Using Formulas You can perform mathematical operations like addition or multiplication. Example: %Input:Price% * %Input:Quantity%   Concatenate Two Merge Fields You can combine multiple fields into one value. Example: %Input:FirstName% %Input:LastName%   Retrieving an Array Value You can access values from an array using index-based notation. Example: %Input:Items[0].Name% These features allow you to handle complex logic without writing Apex code. In SetValues Step 5: Configure a Second SetValues for Concatenation In many cases, one SetValues depends on values created in another SetValues. Steps: Drag and drop another SetValues element. Rename it (for example: SetValues_2). In the Element Value Map: Reference values created in the first SetValues Concatenate or manipulate them as needed Example: %SetValues_1:FullName% – %SetValues_1:TotalAmount%   This shows how data can flow from one SetValues element to another. In SetValues 2 Step 6: Add Response Action to Display Output To display the output data in the Preview Tab, you must use Response Action. Steps: Drag Response Action into the Structure Panel. Configure it to return the required data nodes. Map the values created in SetValues to the Response Action output. Without Response Action, the output will not be visible during execution. In Response Action Step 7: Execute and View Results in Preview Tab After completing the configuration: Steps: Click Validate to ensure there are no errors. Click Activate. Click Execute. Go to the Preview Tab. You will now see: Merged values Calculated results Concatenated fields Final output structure This confirms that SetValues and Response Action are working correctly. On preview tab Best Practices for Using SetValues Use meaningful names for SetValues elements Avoid complex logic in a single SetValues Chain SetValues for better readability Always use Response Action for output visibility Validate and test with sample input data Conclusion SetValues is a powerful and essential component of Integration Procedures in Salesforce Industries. It allows you to merge, calculate, concatenate, and transform data without writing Apex code. By combining multiple SetValues and using Response Action, you can efficiently control the data flow and output of your Integration Procedure. Mastering SetValues helps you build scalable, reusable, and maintainable integrations that work seamlessly with OmniScripts and FlexCards.

How To Use SetValues In Integration Procedure Read More »

How To Enable Flex Card in OmniStudio(Vlocity) Salesforce

FlexCards are a core UI component of Salesforce OmniStudio (Vlocity). They allow you to display data in a responsive, reusable, and dynamic card-based layout without writing code. Before you can create or use FlexCards, you must ensure that OmniStudio and FlexCards are properly enabled in your Salesforce org. This article explains how to enable FlexCard in OmniStudio, including required permissions, settings, and verification steps. What Is a FlexCard in OmniStudio? A FlexCard is a lightweight UI component used to: Display Salesforce or external data Work with OmniScripts and Integration Procedures Show summary views, KPIs, or record details Reuse UI logic across apps and pages FlexCards are part of the OmniStudio Designer and rely on proper feature enablement and user access. Prerequisites to Enable FlexCard Before enabling FlexCards, make sure: OmniStudio (Vlocity) is installed in your org You have System Administrator access Required OmniStudio licenses are assigned Your org is Lightning Experience–enabled Step 1: Verify OmniStudio Is Installed FlexCards are available only if OmniStudio is installed. Steps: Go to Setup Search for Installed Packages Verify that OmniStudio, Vlocity, or Salesforce Industries package is installed If OmniStudio is not installed, FlexCards will not appear. you do not do the setting then this is the error Step 2: Enable OmniStudio Designer FlexCards are created inside OmniStudio Designer, so this must be enabled. Steps: Go to Setup Search for OmniStudio Settings Enable: OmniStudio Designer OmniStudio Runtime Save the settings This allows access to FlexCards, OmniScripts, DataRaptors, and Integration Procedures. Warning Tab Click Than Show This Link Remote Site Setting Step 3: Assign Required Permission Sets Even if OmniStudio is enabled, FlexCards will not be visible without proper permissions. Required Permission Sets: OmniStudio Admin OmniStudio Designer OmniStudio Runtime Steps: Go to Setup Open Users Select your user Click Permission Set Assignments Assign the required OmniStudio permission sets Log out and log in again after assignment. Fill the Tab Step 4: Enable FlexCard Feature Access FlexCards are controlled through OmniStudio capabilities. Steps: Go to Setup Search for Custom Permissions Ensure permissions related to: FlexCard OmniStudio UI Vlocity Cards are enabled via permission sets This ensures the FlexCard option appears in the Designer. Step 5: Access FlexCard from OmniStudio Designer Once enabled, you can access FlexCards. Steps: Click the App Launcher Search for OmniStudio Designer Open OmniStudio Designer Select FlexCards from the left panel Click New to create a FlexCard If FlexCard appears in the menu, it is successfully enabled. Step 6: Verify FlexCard Availability in Lightning App Builder FlexCards can be embedded into Lightning pages. Steps: Go to Lightning App Builder Edit a Record Page or App Page Search for FlexCard in Components Drag and drop it onto the page Configure required properties This confirms FlexCards are available at runtime. Common Issues and Troubleshooting FlexCard Not Visible in OmniStudio Designer Check OmniStudio permission sets Verify OmniStudio Designer is enabled Confirm package installation FlexCard Not Rendering on Page Ensure OmniStudio Runtime permission is assigned Activate the FlexCard Check Data Source configuration No Data Displayed Validate DataRaptor or Integration Procedure Confirm context variables like {recordId} Best Practices for Using FlexCards Always activate FlexCards before use Use reusable FlexCards for performance Prefer Integration Procedures for complex logic Test FlexCards using Preview mode Use context variables for dynamic data Conclusion Enabling FlexCards in OmniStudio is a foundational step for building modern, scalable Salesforce UI solutions. By ensuring OmniStudio is installed, permissions are assigned, and Designer access is enabled, you can start creating powerful FlexCards that integrate seamlessly with OmniScripts and Integration Procedures. Once enabled, FlexCards help you deliver faster, more interactive user experiences without writing Apex or Lightning Web Components.

How To Enable Flex Card in OmniStudio(Vlocity) Salesforce Read More »

Scroll to Top