Skip to main content

I’m working on overriding the standard Messaging element in OmniScript using a custom LWC that extends OmniscriptAtomicElement via LWC Component Override.  

 

The UI renders fine, but I’m running into a key issue: I need to conditionally show or hide the message based on a formula field in the OmniScript data JSON (e.g., IsAvailable). This formula evaluates to true/false based on field selections in the same step. However, inside my LWC, this.omniJsonData always returns undefined, so I can’t access the value.

 

Here’s what I’ve tried so far:

 

  • I’ve extended from OmniscriptAtomicElement as required for element overrides.
  • I attempted to mix in OmniscriptBaseMixin to access OmniScript’s reactive props like omniJsonData, omniJsonDef, etc., but that didn’t work either (it throws errors or breaks the override structure).
  • I also verified that the formula field is part of the current OmniScript data node and accessible if I preview the OmniScript.
  • I even tried putting the omniDataJson in connectedCallback() and stateRefresh() but both still result in undefined data.

 

My main issue is that I don't know how to pass the data from the Omniscript to the override LWC to do validation checks or post processing logic.  

 

#Salesforce Developer @Nick Maio @Riyaz Usman Appreciate your help.

2 件の回答
0/9000