---
schema_version: "1"
id: f22c957964661fd3a495851ceb0b70f60f460a8668dc40bb5b606b265841eae8
title: Creating Translation Maps
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/partner-manager/latest/partner-manager-maps.md
canonical_url: https://docs.mulesoft.com/partner-manager/latest/partner-manager-maps
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 883bf19c300c3bc32096881570a8a1f2e33b31ecd9817c532cf6169fab521923
description: MuleSoft Documentation Site
release: 2.x
latest: true
---
---
product: Partner Manager
version: 2.x
is-latest-version: true
---

# Creating Translation Maps

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Partner Manager uses DataWeave translation maps to transform business transactions between
your partner’s message formats (CSV, EDIFACT, X12, JSON, or XML) and your organization’s enterprise
application message formats (CSV, JSON, or XML).

To use a map, create the map in Anypoint Studio and then import the map to the [Maps](https://docs.mulesoft.com/partner-manager/latest/maps) page in
Partner Manager.

To start with an example of a map, download and then customize the
[B2B/EDI: Order to Cash - Mapping Examples](https://mulesoft.com/exchange/com.mulesoft.muleesb.modules/b2b-order-to-cash-mapping/minor/1.0/)
from Exchange. This example includes the following transformations for message flows:

- Inbound message flows:

  - X12 4010 850 to JSON

  - EDIFACT D97A to JSON

  - CSV to JSON

  - XML to JSON

- Outbound message flows:

  - JSON to X12 4010 855

  - JSON to EDIFACT D97A

  - JSON to CSV

  - JSON to XML

To customize this example:

1.  Open the `.jar` file in Studio.

2.  Change the source message type.

3.  Change the target message type.

4.  Map the input to the output.

5.  Test the map locally.

6.  Import the map to a Partner Manager message flow.

## Open the .jar File in Studio

To open the `.jar` file:

1.  Launch Studio.

2.  From the **File** menu, select **Import > Packaged mule application (.jar)** and click **Next**.

3.  Select the downloaded `.jar` file and click **Open**.

4.  Click **Finish**.

## Change the Source Message Type

To change the message type:

1.  Click the **Global Elements** tab at the base of the Studio canvas.

2.  From **Global Configuration Elements**, select the configuration for the map to use in an
    inbound or outbound message flow.

3.  Click **Edit**.

4.  In **Name**, change the name of the configuration to something meaningful.

5.  If the message flow uses the EDI, JSON, X12, or XML format:

    1.  In **Schema definitions**, select **Edit inline**.

    2.  In **Value**, enter the version and transaction set to map to or from.

        For example, set **Value** to `/x12/005010/830.esl` to map to or from a `005010-830`
        transaction.

6.  Click **OK**.

## Change the Target Message Type

To change the target message type:

1.  If your target message type has an associated schema, copy the schema file into the
    `<Project-name>/src/main/resources` folder in the project.

2.  Select the **Transform Message** component.

    The new transaction set structure displays in one pane of the Transform Message graphical view,
    and your application message structure (CSV, JSON, or XML) displays in the other pane of this
    view.

3.  Map the input fields to the output fields.

## Test the Map Locally

To test the map locally:

1.  In **Package Explorer**, right-click on the template project, and select **Run > Run as Mule
    application**.

2.  Use a REST client to post a message payload.

    For example Postman calls, see the `B2B-Order-to-Cash-Mapping-Studio.postman_collection.json`
    file in the `examples` folder.

    The application returns the transformed payload.

3.  After you verify that the map works correctly, copy the DataWeave map from `src/main/resources`
    and rename it to something meaningful.

## Select the Map for a Partner Manager Message Flow

When you configure a message flow, you can select the `.dwl` file when adding the map from the
**Maps** page or on the **Select a map** page of the message flow. You can also
[version the map](https://docs.mulesoft.com/partner-manager/latest/maps#version-a-map) and change the map selection on a deployed message flow.

## See Also

- [Create Inbound Message Flows](https://docs.mulesoft.com/partner-manager/latest/create-inbound-message-flow)

- [Create Outbound Message Flows](https://docs.mulesoft.com/partner-manager/latest/create-outbound-message-flow)

- [DataWeave Quickstart](https://docs.mulesoft.com/dataweave/latest/dataweave-quickstart)

- [Adding and Versioning Maps](https://docs.mulesoft.com/partner-manager/latest/maps)
