How to Call Integration Procedure In Custom LWC Vlocity (Saleforce/Vlocity / OmniStudio)

In Integration Procedure  

Type && Subtype  Name Give In JavaScript

First we Create a component In visual studio Name like show_IP_Data

In JAVASCRIPT —

write this line to Call Omniscript

				
					import { OmniscriptBaseMixin } from 'omnistudio/omniscriptBaseMixin';
				
			
input — Input we pass input parameter 
sClassName – ‘omnistudio.IntegrationProcedureService’
sMethodName – type_SubType (In IP type_SubType Name)
options — We recieved option Form IP
				
					import { LightningElement ,api ,track} from 'lwc';
import { OmniscriptBaseMixin } from 'omnistudio/omniscriptBaseMixin';
const columns = [
    { label: 'ID', fieldName: 'Id' },
    { label: 'Name', fieldName: 'Name' },
];
export default class Show_Ip_Data  extends OmniscriptBaseMixin(LightningElement){
    data = [];
    columns = columns;
    connectedCallback(){
        const params = {
            input:{},
            sClassName: 'omnistudio.IntegrationProcedureService',
            sMethodName: 'RemoteAction_Call_Apex_RemoteAction_Call_Apex',
            options: '{}',
        }
		this.omniRemoteCall(params, true).then(response => {
            // IMPLEMENT YOUR LOGIC
            this.data = response.result.IPResult.RemoteAction;
           // console.log("this is resposne data "+this.data);
            console.log('dfdss get sresponse'+JSON.stringify(this.data));
        })
        .catch(err => {
            // HANDLE ERRORS
            console.error(err);
        })
    }   
				
			

HTML—

In HTML we creating a data table for show records 
				
					<template>  
    
    <div style="height: 300px;">
        <lightning-card><h1>Data From Ip data From Apex</h1>
        <lightning-datatable
        
                key-field="id"
                data={data}
                columns={columns}>
        </lightning-datatable>
    </lightning-card>
    </div>
</template>
				
			

In meta.xmal 

return for salesforce org 

 

				
					    <runtimeNamespace>omnistudio</runtimeNamespace>

				
			
				
					<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>58.0</apiVersion>
    <isExposed>true</isExposed>
     <targets>
        <target>lightning__AppPage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
    </targets>
    <runtimeNamespace>omnistudio</runtimeNamespace>
</LightningComponentBundle>
				
			
Scroll to Top