viaSocket Help

How to Map Data

Data Mapping in viaSocket is how you connect data between different steps in your workflow - from triggers, actions, or even custom JS code.

You don't need to create variables or placeholders manually. viaSocket automatically makes data from one step available to all the steps that follow.

Think of it like passing data along a chain: one step produces data, and the next step decides how to use it.

#

Step-by-Step: How to Map Data

#

Step 1: Set Up a Trigger Step

Start by adding your trigger - for example, a Webhook trigger that receives form submissions or email data.

  • Connect your app and test the step to fetch sample data.

  • viaSocket will show all available fields like body, headers, and query, each containing nested values such as body.email or body.text.

#

Step 2: Add the Next Step

Add an action step, Custom API, or JS Code block. When you open the configuration panel, click into any input field, viaSocket will display a dropdown showing data from all previous steps.

#

Step 3: Map Data Fields

Click the + icon next to any input field to open the data picker. Navigate through previous steps to select the exact field you need.

dataMapping.png
  • Example: In a JS Code step called "extract email fields," map the rawEmail input to body.email from the Webhook trigger.

  • The field displays the mapped value as a chip, e.g., body.email — directly inside the input.

You can also type the path manually if you already know the data structure. Each time your workflow runs, viaSocket replaces these chips with real data from that specific execution.

#

Step 4: Combine Data from Multiple Steps

You can use chips from multiple previous steps in the same field.

  • Combine a user's name from Step 1 and a discount code from Step 3 in an email template.

  • Merge an API response field with a value processed by a JS Code step.

#

Step 5: Test Your Workflow

Run a Test to confirm mapped data is appearing correctly. Check that all chips are replaced with live values. If a field looks empty, recheck the mapping or review the test output of the earlier step.

#

Step 6: Activate the Workflow

Once satisfied, click Go Live. viaSocket automatically keeps data flowing across all connected steps — no manual setup needed.

#

Summary

Data Mapping in viaSocket makes it effortless to pass data between triggers, actions, and code blocks. Each step automatically shares its output downstream, so you can visually map values - like selecting body.email from a Webhook trigger into a JS Code input, without writing any extra code.