Blogs

How to Pass Data Parent FlexCard to Child FlexCard

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)

Context Variables in Salesforce:      In Salesforce, context variables typically refer to variables that store information specific to the current context or execution environment. These variables can be used to pass data between different elements of a process or to control the behavior of a process. Context variables can be used in various Salesforce features, including Process Builder, Flows, Apex code, and Lightning components. —  Global and local context variables are available to a FlexCard to provide context to data sources, actions, and other components. All variables are case sensitive.  Global Variables — /*! elementor – v3.18.0 – 20-12-2023 */ .elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px} NAME Label   2. Params   3. Parent       4. recordId             5. records MERGE FIELD   {Label.mylabel}     {Params.fieldName}     {Parent.attributeName}  example, Parent.Id gets the {Id} attribute defined on the parent FlexCard. {recordId}             {records} DESCROPTION For example, {Label.AccountName} gets a custom label named AccountName. For example, {Params.Id} gets the context Id. We recommend using {recordId} to get the context Id of a record. Reference attributes from the parent FlexCard on the child FlexCard with this variable. Attributes are defined at design time on the parent FlexCard. correct it. if using a DataRaptor to get a list of Account Cases, in the Input Map, enter AccountId as Key and {recordId} as the Value. Then add a Test Parameter whose Key is recordId and Value is 138238279r9ff to populate your FlexCard with actual data. For example, {records} gets all records, while {records [0]} gets the first available record. Salesforce Guide – https://help.salesforce.com/s/articleView?id=sf.os_flexcards_context_variables_42922.htm&type=5

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

How to use Response Action In Integration

Lets see how to use Response Action In Integration Procedure (Salesforce / Vlocity / OmniStudio). Note :– Sending Integration Procedure Data to Omniscript: Integration Procedure Configuration:  you create an Integration Procedure to interact with an external system.  Response Action in Integration Procedure: In the Integration Procedure, after the integration step, you add a Response Action. This is crucial because it specifies what should happen with the response received from the external system. Data Mapping in Response Action: Within the Response Action, you perform data mapping to map the fields in the integration response to variables within the Integration Procedure. This step ensures that the data obtained from the external system is captured and can be used further. Return Data to Omniscript: Once the data is mapped, you may configure the Response Action to send this data back to the Omniscript. You can use variables or additional output settings to determine what data is sent back Step :–1  Response Action in Integration Procedure: Design the Integration Procedure: Open the Salesforce Omniscript Builder and navigate to the Integration Procedure you are working on. Configure Response Action: Within the Integration Step, add a Response Action. This defines what should happen before the completion of the Integration Procedure  Response Action Configuration: Configure the Response Action based on your use case. If Return Full Data JSON is True, you send all data on preview tab . /*! elementor – v3.18.0 – 20-12-2023 */ .elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=”.svg”]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block} Response Action In Integration Procedure Execute Action in Preview Tab: —    Configure the properties of the execute button, specifying what action should be triggered when the button is clicked. On Preview Tab Step :– 2    Send/Response Transformations in Integration: SEND/RESPONSE TRANSFORMATIONS: In the context of integration procedures, Send/Response Transformations typically involve mapping . Send JSON Path in Response Action: Within the Response Action, you might have a configuration related to the response. If you want to use the data received in the response and send a specific node from it in the next step, you would use the Send JSON Path in the Response Action. Specify Send JSON Node: In the Send JSON Path configuration of the Response Action, you might find an option like “Send JSON Node.” This setting allows you to specify a different node from the response to be used in subsequent steps. Example: If your integration response contains a structure like {“result”: {“data”: {…}}}, and you want to send the data node to the next step, you might set the Send JSON Path in the Integration Step to $.result and then use Send JSON Node in the Response Action to specify data.  Note :  From here we pass all data in 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: Configure Additional Output Response: In your Integration Procedure within Omniscript, you may have an option for “ADDITIONAL OUTPUT RESPONSE.” Return Only Additional Output Setting: Within the configuration, there is an option called “Return Only Additional Output.” When set to true, it means that the response will include only the additional output data. Additional Output: Specify the additional output data that you want to include in the response. This could be specific fields, properties, or nodes depending on your integration requirements. In Response Action On Preview Tab After Click On Execute   On Preview Tab

How to use Response Action In Integration Read More »

How to use loop in apex Salesforce

In Apex, you can use loops to iterate over collections, execute a block of code multiple times, or perform repetitive tasks. There are mainly three types of loops in Apex: for loop, while loop, and do-while loop. Here are examples of each: if you want to how to create apex class click here or salesforce guide 1- For Loop: The for loop is commonly used when the number of iterations is known. for (Integer i = 1; i <= 5; i++) { System.debug(‘Iteration ‘ + i); } This loop will iterate from 1 to 5, and the System.debug statement will display each iteration. 2- While Loop: The while loop is useful when the number of iterations is not known beforehand. Integer j = 1; while (j <= 5) { System.debug(‘Iteration ‘ + j); j++; } This loop will also iterate from 1 to 5, and the System.debug statement will be executed in each iteration. 3- Do-While Loop: Similar to the while loop, the do-while loop is used when you want to execute the loop body at least once, regardless of the loop condition. Integer k = 1; do { System.debug(‘Iteration ‘ + k); k++; } while (k <= 5); This loop will iterate from 1 to 5, and the System.debug statement will be executed at least once. Looping Through Lists: You can also use loops to iterate through collections like lists or arrays. List fruits = new List{‘Apple’, ‘Orange’, ‘Banana’}; for (String fruit : fruits) { System.debug(‘Fruit: ‘ + fruit); } This loop iterates through each element in the fruits list and prints each fruit. Thank,s.. Raghvendra Pratap Singh  Apex Developer

How to use loop in apex Salesforce Read More »

how to create apex class in salesforce

Creating an Apex class in Salesforce involves writing server-side code to extend the functionality of your Salesforce application. Follow these steps how to create Apex class in salesforce:. Here are step-by-step instructions for both methods: There are some useful link please click the link below public class MyApexClass { public String greeting { get { return ‘Hello, Salesforce!’; } } } Save the Apex Class: Click File -> Save (or use Ctrl + S or Cmd + S) to save your Apex class. Compile and Check for Errors: Click Run -> Compile All Classes to compile your Apex class. Check the “Problems” tab for any compilation errors. If there are errors, review the code and fix them. Execute or Integrate: Once your Apex class is error-free, you can use it in other parts of your Salesforce environment, such as triggers, controllers, or batch jobs. Method 2: Using Visual Studio Code with Salesforce Extensions Install Visual Studio Code: If you don’t have Visual Studio Code installed, download and install it from Visual Studio Code website. Install Salesforce Extensions: Install the Salesforce Extension Pack for Visual Studio Code. You can find it in the Visual Studio Code Extensions Marketplace. Open Visual Studio Code: Open Visual Studio Code, and make sure the Salesforce Extension Pack is installed and activated. Create a New Apex Class: Click on the “Explorer” icon on the sidebar. Right-click on your Salesforce project folder and select SFDX: Create Apex Class. Enter a name for your class when prompted. Write Apex Code: In the editor, write your Apex code. Save the Apex Class: Save  Apex class by clicking File ->  (or use Ctrl + S or Cmd + S). Deploy to Salesforce: Use the Salesforce CLI commands or the Salesforce Extensions to deploy your Apex class to your Salesforce environment.   thanks for read…. Raghavendra Pratap Singh  Apex Developar

how to create apex class in salesforce Read More »

How to Make Set Value and Response Action in IP.

  Create an Integration Procedure Start by creating a new Integration Procedure. Drag and drop the “Set Values” component on to the canvas within the Integration Procedure. Give a meaningful name to the “Set Values” component to identify its purpose. Create Variables: Navigate to the Element Name section within the “Set Values” component. Create multiple variables as needed. For example, create variables for “FirstName” and “LastName.” /*! elementor – v3.18.0 – 20-12-2023 */ .elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=”.svg”]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block} Create Another Set Values Component (Merge_Name): Within your Integration Procedure, drag and drop another “Set Values” component onto the canvas. Name this new “Set Values” component as “Merge_Name” to reflect its purpose. Configure Merging of FullName: In the Element Name section, concatenate the FullName using the provided formula: FullName: Use this as the Element Name. Given Value: %Full_Name:firstName% + ” ” + %Full_Name:lastName% Create Another Set Values Component (Merge_Name_Using_Array_Element): Within your Integration Procedure, drag and drop another “Set Values” component onto the canvas. Name this new “Set Values” component as “Merge_Name_Using_Array_Element” to reflect its purpose. Configure Merging using Array Element: In the Element Name section, concatenate the merged name using the provided formula: Element Name: Merge_Name: Use this as the Element Name. Given Value: %Name|1:firstName% + ” ” + %Name|1:lastName% Configure Response Action with Additional Output Transformation: After creating the “Merge_Name_Using_Array_Element” Set Values component, drag and drop a “Response Action” onto the canvas within your Integration Procedure. Click on the “Additional Output Transformation” section within the Response Action configuration. In the “Value” field, specify the value as: =%Merge_Name_Using_Array_Element:FullName% On the Preview Tab: Navigate to the Preview Tab within your development environment or interface. Pass input parameters in JSON data for testing purposes. {     “Name”: [         {             “FirstName”: “Jhon”,             “LastName”: “Mark”         },         {             “FirstName”: “Gate”,             “LastName”: “Mark”         }     ] } After Clicking on EXECUTE: After configuring the input parameters on the Preview Tab: Click on the “EXECUTE” button to initiate the execution of your Integration Procedure. “Great! We have successfully found the response.”

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

How To Embed OmniScript in Another OmniScript.

In this post we see how to Embed omniscript in another omniscript let us expler this feature in omniscript. Reusable omniscript  :-  When an omniscript is Callable from another omniscript to use all the feature of the specific omniscript.                                               . In this blog we will Create an omniscript and make it Reusable call it from another Parent omniscript and use it. Setp :- 1  Create an omniscript and Check the Reusable checkbox From Setup Section ,to make it Reusable and callable from another omniscript. Take a text or any field to identify that omniscript. Activate the reusable omniscript to call it. Step  :– 2   Create another omniscript or Parent omniscript where we call the Reusable omniscript. Step  :– 3  Go to the Build Section and Move Down to open the omniscript and  check the  Name of the reusable omniscript and Drag it . Activate it and Preview it it will show the reusable omniscript . All the data will come to the Parent omniscript. Step:-4  Drag and drop the child omniscript on canvas that we have created previously to show the data of child / reusable omniscript. When preview the parent omniscript we see “this is Reusable/Child Omniscript“means this is the value of Reusable omniscript so child came to the Parent OS

How To Embed OmniScript in Another OmniScript. Read More »

How To Use SetValues In Integration Procedure

:–   Here we create a setvalues  an Integration Procedure. In setvalues we merge to Element Value  in the other setvalues  . Procedure for Integration with SetValues: Step 1: Create an Integration Procedure. Begin by creating an Integration Procedure to handle the data integration process. Step 2: Add SetValues to the Structure Panel. Drag and drop the SetValues component into the Structure Panel of your Integration Procedure. Step 3: Configure Element Value Mapping. In the Element Value Map section, click on “Add New Value” to define the mapping of values between different elements. Step 4: Perform Operations in SetValues. Within the SetValues component, you have various options: Merge Fields: Combine values from different fields. Calculations Using Formulas: Perform calculations on specified fields. Concatenate Two Merge Fields: Combine two fields into a single value. Retrieving an Array Value: Access values from an array or list. /*! elementor – v3.18.0 – 20-12-2023 */ .elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=”.svg”]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block} In SetValues Step 5: Configure Second SetValues for Concatenation. For the second SetValues operation, focus on concatenating two merged fields. In SetValues 2   Step 6: Add Response Action to Display Data in Preview Tab. To showcase the data in the Preview Tab, drag the Response Action component into the Structure Panel. like show on  below figure. In Response Action Step 7: Execute and View Results in the Preview Tab. After configuring the Response Action and completing the necessary setup, click on the “Execute” button. Navigate to the Preview Tab to view the results of the integration process. On preview tab Salesforce Guide = https://help.salesforce.com/s/articleView?id=sf.os_set_values_for_integration_procedures.htm&amp;type=5

How To Use SetValues In Integration Procedure Read More »

How To Enable Flex Card in OmniStudio(Vlocity) Salesforce

“We will explain in this blog how to enable Flex Cards. Step1: Open OmniStudio in App Manager Step2: As you unfold the Flex Card, a thoughtful message emerges, gently reminding you that the creation of this card awaits resolution of the associated warning. To fix this warning, go to the warning tab and find two links. Click on each link, and it will take you to Remote Site Settings. Before that, go to setup. You need to set up the remote site before making a flex card; otherwise, there might be an error when creating the flex card. I hope you understand how to Enable Flex Card in Salesforce.

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

How To Use ListAction In Integration Procedures

— :  In this post we create  two array/list and merge both. (ListWithName and ListWithAge)   Step :– 1     First we create an Integration Procedure and drag a List Action on canvas .                        Here we merge two list in one  //This data is we pass in preview tab in json data { “ListWithName”: [ { “Name”: “Supre Man”, “id”: “1”, “External_Id”: “11” }, { “Name”: “Bad Man”, “id”: “2”, “External_Id”: “12” }”13″ } ], “ListWithAge”: [ { “Age”: “20”, “id”: “1”, “External_Id”: “11” }, { “Age”: “32”, “id”: “2”, “External_Id”: “12” } ]} /*! elementor – v3.18.0 – 20-12-2023 */ .elementor-widget-image{text-align:center}.elementor-widget-image a{display:inline-block}.elementor-widget-image a img[src$=”.svg”]{width:48px}.elementor-widget-image img{vertical-align:middle;display:inline-block} In List Action Step :– 2 Drag Response Action and pass the list name within %% sign, in Additional Output. In Response Action On the preview tab.  Step :– 3  In MERGE FIELDS =  Here we provide the field which we want to merge. In List Action On the preview tab  On preview tab                      Has Primary = true (list name we want to pass as Primary list) Step :– 3  If Advanced Merge=  true (match the both field with both array) Advanced Merge = true Well Done!!! We got the result in preview tab  On preview tab Salesforce Gide = https://help.salesforce.com/s/articleView?id=sf.os_list_merge_action_for_integration_procedures.htm&type=5

How To Use ListAction In Integration Procedures Read More »

Scroll to Top