--- title: "Create mapping variables" slug: "create-mapping-variables" description: "Learn how to use mapping variables in message runs to store and retrieve values efficiently across records, enhancing your integration design process." tags: ["Task topic"] updated: 2026-08-24T08:40:47Z published: 2026-08-24T08:40:47Z canonical: "docs.staedean.com/create-mapping-variables" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Create mapping variables During a message run, you can use mapping variables to store values. You can write (calculated) values to a mapping variable, and later during the message run, read the value from the mapping variable. You can use mapping variables across records. The mapping variable values are only stored during the message run. When the message run is finished, the mapping variable values are deleted. During a message run, to: - Write a mapping variable, on a field mapping, define the mapping variable as target variable, instead of using a target field. To set the mapping variable value, you can use several field mapping options, for example, a constant value, a custom expression, or a source field value. You can also use mapping variables on custom methods. - Read a mapping variable, on a field mapping, define the target field to be filled with the mapping variable value. Instead of a source field, use the **Variable** field options to define the mapping variable which value must be used to set the target field value. - Read a mapping variable for use in a custom expression, for the custom expression, create a variable with the **Mapping variable** field filled. ### Steps 1. Click **Connectivity** **studio - Integration Design**. 2. On the **Message** tab, in the list, find and select the desired message. 3. Click **Edit**. 4. On the **Action Pane**, click **Design**. 5. Click **Mapping** **variable**. 6. Click **New**. 7. In the **Name** field, type a value. 8. Define the data type of the value that is stored in the mapping variable. Only these types are supported: In the **Data type** field, select an option. - **String** - **Integer** - **Real** - **Date** - **Enum** - **UtcDateTime** - **Int64** 9. Close the page. 10. If you have created mapping variables for a message, on the **Message (details)** page, on the **Field mapping** tab, these fields are added: To show the mapping variable fields, refresh the page. See also: [Apply mapping variable (Field option)](/data-management/docs/apply-mapping-variable-field-option) - **Target variable** - **Variable** > [!NOTE] > **Notes** > > You can use mapping variables instead of calculations. ## Related - [Use calculations in a message](/use-calculations-in-a-message.md) - [Define field options](/define-field-options.md) - [Apply mapping variable (Field option)](/apply-mapping-variable-field-option.md)