Monday, October 21, 2024

Vlocity Omnistudio Documentation

Data raptor documentation:

https://www.omnistudiofacts.com/post/using-formulas-in-dataraptors

1.

To Find the DR which is send data to docusgn:

Omniscript --> Enrollment/MEWA_IN_GA --> MEWA_All_States_docusign1 (OS) --> DocuSignEnvelopeAction_OH_SOCA_2023 (DocuSign Envelop action) -->find "DR Interface"


Exercise on Ominscript + IP + DR

 

 

2.

Reduce space between the elements from Omniscript add below Styling in the "CUSTOM HTML TEMPLATES" in script configuration Omniscript

<style>

ng-form#DocumentsToSend_VA\|0 ul.slds-form-element.ng-scope {

    padding-bottom: 0 !important;

}

ng-form#DcoumentsToSend_OH\|0 ul.slds-form-element.ng-scope {

    padding-bottom: 0 !important;

}

ng-form#DcoumentsToSend_OH_SOCA\|0 ul.slds-form-element.ng-scope {

    padding-bottom: 0 !important;

}

</style>

 

 

Remote action :

 private Boolean transformABFMedProducts(Map<String,Object> inputMap, Map<String,Object> outMap, Map<String,Object> options){

        system.debug('inside transformABFMedProducts '+inputMap);

        taskType = (String)options.get(TASK_TYPE);

        if(options.containsKey(WITH_QUOTING) && (Boolean)options.get(WITH_QUOTING))  {

            outMap.put(FINALMEDPLN1,String.isNotBlank((String)options.get(ABFMEDPLAN1)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(ABFMEDPLAN1)).replace(PERCENT,PERCENTSIGN) : (String)options.get(ABFMEDPLAN1));

            outMap.put(FINALMEDPLN2,String.isNotBlank((String)options.get(ABFMEDPLAN2)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(ABFMEDPLAN2)).replace(PERCENT,PERCENTSIGN) : (String)options.get(ABFMEDPLAN2));

            outMap.put(FINALMEDPLN3,String.isNotBlank((String)options.get(ABFMEDPLAN3)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(ABFMEDPLAN3)).replace(PERCENT,PERCENTSIGN) : (String)options.get(ABFMEDPLAN3));

            outMap.put(FINALMEDPLN4,String.isNotBlank((String)options.get(ABFMEDPLAN4)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(ABFMEDPLAN4)).replace(PERCENT,PERCENTSIGN) : (String)options.get(ABFMEDPLAN4));

        }else{

            outMap.put(FINALMEDPLN1,String.isNotBlank((String)options.get(NQABFMEDPLAN1)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(NQABFMEDPLAN1)).substringAfter('-').replace(PERCENT,PERCENTSIGN) : ( String.isNotBlank((String)options.get(NQABFMEDPLAN1))? ((String)options.get(NQABFMEDPLAN1)).substringAfter('-') : (String)options.get(NQABFMEDPLAN1)));

            outMap.put(FINALMEDPLN2,String.isNotBlank((String)options.get(NQABFMEDPLAN2)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(NQABFMEDPLAN2)).substringAfter('-').replace(PERCENT,PERCENTSIGN) : ( String.isNotBlank((String)options.get(NQABFMEDPLAN2))? ((String)options.get(NQABFMEDPLAN2)).substringAfter('-') : (String)options.get(NQABFMEDPLAN2)));

            outMap.put(FINALMEDPLN3,String.isNotBlank((String)options.get(NQABFMEDPLAN3)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(NQABFMEDPLAN3)).substringAfter('-').replace(PERCENT,PERCENTSIGN) : ( String.isNotBlank((String)options.get(NQABFMEDPLAN3))? ((String)options.get(NQABFMEDPLAN3)).substringAfter('-') : (String)options.get(NQABFMEDPLAN3)));

            outMap.put(FINALMEDPLN4,String.isNotBlank((String)options.get(NQABFMEDPLAN4)) && !(PRINT.equalsIgnoreCase(taskType)) ? ((String)options.get(NQABFMEDPLAN4)).substringAfter('-').replace(PERCENT,PERCENTSIGN) : ( String.isNotBlank((String)options.get(NQABFMEDPLAN4))? ((String)options.get(NQABFMEDPLAN4)).substringAfter('-') : (String)options.get(NQABFMEDPLAN4)));

        }

        return true;

 

    }

 

Extract DR:

Step 1



 

Step 2



 

Step 3


Omni studio Interview questions:

  • Scenario based on Vlocity
  • Data raptor?
  • Integration procedure?
  • Flex cards?
  • Best practices in omni studio?
  • Reusable ip?
  • 8. How to improve the performance of Omniscript?
    1. Reduce Conditional Views,
    2. Trim JSON response
    3. Reduce number of elements.
  • 9. What is the difference between Salesforce Screen flow vs Omniscript?
  • 12. What is the use of Remote Action?
  • How to include Omniscript in Community?
    1. From Setup, in the Quick Find box, search for Digital Experiences and then select All Sites.
    2. Next to your site name, click Builder.
    3. Create or go to the page where you want to add an OmniScript form.
    4. drag the OmniScript component onto the content area of the page..
    5. To identify which OmniScript to use in the component, in the properties panel, select the Type, SubType, and Language that you specified when you created the OmniScript form.
    6. Repeat to add other forms to your site as necessary.
    7. Preview your changes and publish them when you're finished.

 

  • 14, Ip in Synch, Ip in async(is chainable, is queueable) -- execution time is less
  •  Omniscript -- Http action ?
  • Try catch block ?
  • Save options  --- save for later option enable?
  • Ip in ip?
  • IP : Output Response   -- Return Only Additional Output?
  •  implements vlocity_ins.VlocityOpenInterface?
  • Classic lightning conversion  Omniscript?
  • Omniscript LWC include vice versa?
  • How to identify the Json whether Json from DR or apex?
  • Ip in apex?
  • What is the difference between Salesforce Screen flow vs Omniscript?

Screen flow is better for simpler forms that only interact with Salesforce data, and where the exact look and feel isn’t so important. Think more general internal (employee) forms  –  such as feedback forms or IT support requests.

 

OmniScript is better for more complex, higher-value interactions and/or where branding is important. Think industry-specific, consumer-facing processes, such as signing up for a mobile phone plan or requesting an increased credit card limit.

 


 

 

  • How to convert multiple lists into one list:

LISTMERGE("ProductSiteName",LIST(%QuoteLine%))

https://salesforce.stackexchange.com/questions/421165/group-by-a-field-with-a-dataraptor-transform

 

  • How to call Data raptor into apex:

string DRname = 'MRK_Test';

map<string, object> input = new map<string, object>();

omnistudio.DRProcessResult drProcessResult = omnistudio.DRGlobal.process(input, DRname);

list<map<string, object>> resultJson = (list<map<string,object>>)result.toJsonList();

system.debug('resultJson=='+resultJson);

 

  • What is the need of is Lookup option in Load data raptor:

Insert contact record, need to update the email address from user object we can do with no need to query the user record.

Assign the value from user object

 

  • Can we call reusable Omniscript into another reusable Omniscript?

No

 

  • How to resolve the System timeout/CPU timeLimit issues in vlocity?

Apex

  • Salesforce platform imposes a CPU usage governor limit to any given execution context, which is approximately 10 seconds. It means that Apex Code, declarative tools or a combination in a transaction, must not exceed a ~10-second limit. The CPU time error is contained within Salesforce Governor Limits.
    • 5 Things to Know
      • The error also involves declarative tools. It is calculated for the executing Apex code and any processes that are called from this code, such as package code, and Flows. Thus it is not merely for Apex as the name entitles.
      • It is shared with certified managed packages. The certified managed package is a package that has passed the security review for AppExchange. It has its own set of limits for most per-transaction limits. However, Apex CPU Time Limit is an exception.
      • It is non-negotiable. This means we cannot increase the 10-second threshold by tweaking settings, buying more allocations from Salesforce or work around it by other means. It is an absolute hard limit.
      • It shuts down the execution immediately. It is a full stop.
      • It rolls back all database transactions. For example, you might have done multiple DMLs successfully in the transaction. These DMLs are reverted when this limit hits.
  • Simple way :
    • Trigger logic enters unexpectedly multiple times. Trigger logic finishes first, workflow follows to update
    • Nested loops
    • Code in Managed package

Omniscript

  • Optimize DataRaptor and Integration Procedures : minimize the number of fields retrieved and processed
  • Break Down Complex Scripts
  • Use Caching : where ever required use it
  • Monitor and Debug:
  • Adjust Timeout Settings: In scrpt configuartion --> persistant component --> Remote Timeout (ms) -->30000(30 ms defalt) --> can increase
  • Review Governor Limits:
  • Review Governor Limits:

 

 

  

No comments:

Post a Comment

CSS Styling

Styling: 1. Inline Styling: < div style = "font-size: 2rem;font-weight: 400;" > Good Evening </ div > 2. Usi...