---
schema_version: "1"
id: 81f09e99f1e3a634a4cad45dccf01366faec9449be96d436a33c0adc181d4fea
title: Update an Omniscript's JSON Code from a Flexcard
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/os_update_an_omniscript_from_a_flexcard_27677.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.os_update_an_omniscript_from_a_flexcard_27677.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: c0e69fc2be05d9bdbbc9888df48d319dde80e4f3aefe84308dab4d0640d9c01b
description: Specify the JSON node that Omnistudio updates in response to a user action on the Flexcard by embedding the Flexcard in the Omniscript as a custom Lightning web component.
products:
  - Omnistudio
release: "264"
---
# Update an Omniscript's JSON Code from a Flexcard

Specify the JSON node that Omnistudio updates in response to a user action on the Flexcard by embedding the Flexcard in the Omniscript as a custom Lightning web component.

1. After you select the update Omniscript action type, enter the information as needed. If you don’t select a parent node, Omnistudio stores the result in a new node in the JSON code
2. To pass the data to update, add an Input Parameter.
    1. In Key, enter the name of the field to update. For the preceding example, enter `records`.
    2. In Value, enter the new value from the Flexcard's data source. For the preceding example, enter the `{records}` context variable to pass all asset records.
3. From Setup, turn on Omniscript support.
4. [Embed Flexcards in an Omniscript](https://help.salesforce.com/s/articleView?id=xcloud.os_embed_flexcards_in_an_omniscript_24124.htm&release=264.0.0&type=5 "Embed a Flexcard Lightning Web Component in an Omniscript by using the Custom LWC element. Flexcards can receive data from the Omniscript and perform any action available in the Flexcard.")

![Suspend a Mobile Device Plan](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-xcloud-omnistudio-264-0-0-production-enus/f526eaa8-ae05-487a-8944-4bb99b0b78ac/images/icon_example.png)

Suspend a Mobile Device Plan

Create a Flexcard where customers start the process to suspend their mobile device plan.

- 1. Create a Flexcard that displays the customer's available devices.
    2. Add a toggle element so that they select a device.
    3. To pass the value of the action (`true` or `false`) to the Omniscript, add an update Omniscript action to the toggle.
    4. In Parent Node, enter `data.`
    5. Add a new key/value pair for Input Parameters.
        
        1. In Key, enter `records.`
        2. In Value, enter the `{records}` context variable.
    6. Create an Omniscript that walks a customer through the process of selecting the device and entering a suspension date range, before submitting the request.