> For the complete documentation index, see [llms.txt](https://docs.renderdraw.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.renderdraw.us/usage-scenarios/use-cases/2d/data-interaction-within-a-flow.md).

# Data interaction within a Flow

When you need to update an intertaction within a 2D screen, often it is wise to use a Salesforce Lightning Flow

### From the Configuration of the scene, make sure you setup the scene for use within a Lightning flow

<figure><img src="https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2FGFHkgfaNmjKPKMmeicDT%2Fimage.png?alt=media&amp;token=5bd92d59-f57d-494e-b5b6-69279fad2ba5" alt=""><figcaption></figcaption></figure>

1. Ensure you have the show next option selected; this will allow the user to see the proceed button (shown as save)

   **a.** Optionally set the text and the icon for the next button. The icons are available at <https://www.lightningdesignsystem.com/icons/>
2. Check the "Use with Lightning flow" option to ensure that when a user presses proceed, the Canvas object is generated and sent to the next step of the lightning flow
3. The Next button has been displayed to the user for interaction.

{% hint style="info" %}
You can redirect the user flow to the 2D canvas within a flow if you modify the Canvas object properties. The canvas will redraw based on the properties passed
{% endhint %}

Our interactions pass a apex object back and forth, and this object is detailed here:

[Canvas](https://docs.renderdraw.us/api-documentation/data-objects-used-throughout-the-suite/canvas.md)

This Canvas object contains the latest information from the canvas directly.

The standard data flow goes something like this:

<img src="https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2FeD6BN98n7nQFts4UWXcy%2Fimage.png?alt=media&amp;token=4222506f-a3d7-4cbe-a6b9-999ccdbb3c56" alt="" data-size="original">

Where we are using the Canvas object as a variable and mapping properties from it's sub-objects (in this case, draggable items) into products in a custom configuration scenario.

Setting up a Canvas object is as simple as defining the variable:

![](https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2Fuj6qWLGN61OKddhxk3TS%2Fimage.png?alt=media\&token=7c73bca0-c84c-4a47-903d-8b06be407c18)

and then mapping before and after the canvas interaction

![](https://1083871259-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJW2NJcrdHUw4YcOz4UJN%2Fuploads%2FSvq3DfMu7UXLsWctlDiy%2Fimage.png?alt=media\&token=f0f9c0ee-04f1-4b1b-b95a-98ce58fa0f4f)
