0

I'm working with an OmniScript that includes a custom LWC component. The LWC writes the following structure into the OmniScript's jsonData:

"SelectSigners": {"PickSigners": [
{
  "email": "[email protected]",
  "id": "005AU00000KyHnFYAV",
  "name": "eu User 2",
  "role": "EU_Customer_R",
  "routingNumber": 1,
  "recipientId": 1,
  "recipientType": "Signer",
  "recipientLocale": "en_US",
  "Select": true,
  "signerRole": 1
}]}

What I need is to change the signerRole field to 2 by default, ideally without affecting the rest of the structure.

Here’s what I’ve tried:

DataRaptor Transform

During preview, it correctly modifies signerRole to 2.

However, the OmniScript jsonData remains unchanged after execution.

Set Values element

Using SelectSigners:PickSigners[0]:signerRole as the element name and 2 as the value.

Instead of updating the existing field, it creates a new, duplicate attribute in the root of jsonData.

Integration Procedure (Remote Action Custom Apex Class)

Similar to the DataRaptor: it returns the correct value in debug, but does not update the OmniScript’s jsonData.

Question: How can I reliably update a nested field like SelectSigners.PickSigners[0].signerRole within the OmniScript jsonData without creating a duplicate or without losing reference to the original structure written by the LWC?

1 Answer 1

0

The datamapper can be bit tricky when it comes to changing only one single element. When using remote action, add a Response Action block, and try checking the option called "Return Only Additional Output" in the IP and give the same JSON name SelectSigners = %SelectSigners%, This might update the existing main JSON.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.