Using Custom LWC inside Vlocity Omniscript – User friendly Tech help

Problem- Due to omniscript limitations, it happens you need to use custom LWC to achieve the requirements.

n

Solution:- 

n

    n

  • Get the custom LWC from the salesforce Lightning web components (in our example we are using radio group)
  • n

  • n
    n    nn
  • n

  • Omniscript Designer > Inputs > drag “Custom LWC” inside step
  • n

  • Map the custom LWC (radio group in our case ), under “Lightning Web Component Name
  • n

n

n

    n

  • For passing any custom data, lets say coming from dataraptor, and use it in custom LWC
  • n

n

n

    n

  • In Custom LWC, .meta.xml file make 2 changes
  • n

n

    n

  • n
      n

    • true
    • n

    • vlocity_ins
    • n

    n

  • n

n

runtimeNamespace is dependent on the vlocity vertical you are using say Communucation use vlocity_cmt (namespace) or vlocity_ins(for insurance)

n

    n

  • Inside your custom lwc .js file use the below lines of code to create omnscript wrapper
  • n

n

import { OmniscriptBaseMixin } from "vlocity_ins/omniscriptBaseMixin";nnexport default class customLWCRadioGroup extends OmniscriptBaseMixin(n  LightningElementn) {n//your lwc code here for radio group as shown aboven}

n

    n

  • Deploy your changes to your sandbox for custom lwc, activate the omnscript,  Enable LWC(on script configuration), perview the LWC
  • n

Was this article helpful?
YesNo

Similar Posts