Skip to main content
지금은 온라인 Trailblazer Community가 읽기 전용으로 제공됩니다. Trailblazer Community는 곧 Slack에서 제공되어 새로운 활동을 이어갈 예정입니다. FAQ 읽기 | 도움 받기

Transform Input Data and Load Order Data to Salesforce

Create a Data Mapper Transform

Now that you have data from your data mapper extract, use a data mapper transform to restructure or format your input data. You can use the data mapper transform to group all the data in a single node that you can send as a single package to a Flexcard or Omniscript. Let’s use it to restructure the order and external country data.

Here’s how you create the data mapper transform.

  1. Click App Launcher, then find and select Data Mappers.
  2. Click New.
  3. In the Create New: Data Mapper window, enter these details.
    • Name: DMTransformOrderAndCountryData
    • Interface Type: Transform
    • Input Type: JSON
    • Output Type: JSON
  4. Click Save. The data mapper opens in the Data Mapper Designer in a new tab.

Next, add easy-to-understand names to the order data and the country data coming from the external website via the integration procedure you’ll build later. Use mapping to structure all the data into a proper format that’s easy to refer to while configuring the workflow.

  1. In the Data Mapper Designer, click the Transforms tab.
  2. Click Create Mapping.
  3. On the Create Mapping window, for JSON Input Path, enter DMGetOrder:OrderNumber.
  4. On the Create Mapping window, for JSON Output Path, enter OrderNumber.
  5. Click Save & New to add more mappings.
  6. Repeat steps 3 to 5 and add these mapping data. After you enter the last mapping details, click Add on the Create Mapping window.

JSON Input Path

JSON Output Path

DMGetOrder:OrderStatus OrderStatus
DMGetOrder:ShippingMethod ShippingMethod
DMGetOrder:ShippingStreet ShippingStreet
DMGetOrder:ShippingCity ShippingCity
DMGetOrder:ShippingState ShippingState
DMGetOrder:ShippingPostalCode ShippingPostalCode
DMGetOrder:ShippingCountry ShippingCountry
DMGetOrder:AccountName AccountName
DMGetOrder:OrderAmount OrderAmount
Input:name:common CountryName
Input:capital Capital
FullFlagUrl FlagUrl
Input:region Region
Input:timezones Timezones
Input:maps:googleMaps GoogleMapsUrl

Use a formula to fetch the country flag image.

  1. In the Data Mapper Designer, click the Formula tab.
  2. Click Add Formula to add a Transform Formula element to the designer canvas.
  3. Click Additional options and select Edit to add the formula details.
  4. In the Formula text field, enter CONCAT("https://th-hoc-earthnations-e1403d711d73.herokuapp.com", Input:flags:png).
  5. In the Formula Result Path, enter FullFlagUrl.

Use a formula to structure the data for Timezones and make them appear sequentially together.

  1. In the Data Mapper Designer, click the Formula tab.
  2. Click Add Formula to add a Transform Formula element to the designer canvas.
  3. Click Additional options and select Edit to add the formula details.
  4. In the Formula text field, enter JOIN(%timezones%, ', ').
  5. In the Formula Result Path, enter Timezones.

The data paths in the JSON Input Path column are configured in the Order and Country Data Processing with Omnistudio Integration Procedure, which you’ll create in the next badge. For example, the DMGetOrder:[path] data is coming from the DMGetOrder data mapper extract action in the Integration Procedure and the Input:[path] data is coming from the HTTP action in the Integration Procedure. The HTTP action uses the external website URL to fetch the country information.

Right now, let’s create a data mapper load.

Create a Data Mapper Load

A data mapper load updates data into one or more Salesforce objects. In this example, you use a data mapper load to update the shipping details of an order.

  1. Click App Launcher, then find and select Data Mappers.
  2. Click New.
  3. In the Create New: Data Mapper window, enter these details.
    • Name: DMLUpdateOrderDetails
    • Interface Type: Load
    • Input Type: JSON
    • Output Type: sObject
  4. Click Save. The data mapper opens in the Data Mapper Designer in a new tab.
  5. In the Objects tab, click Add Load Object. A Load Object element appears in the designer canvas.
  6. For Select Object, find and select Order.

Next, map the input data from the JSON input path coming from the Omniscript to a destination object field.

  1. In the Data Mapper Designer, click the Mapping tab.
  2. Click Create Mapping.
  3. On the Create Mapping window, for JSON Input Path, enter OrderId.
  4. On the Create Mapping window, for Domain Object, select 1 - Order from the dropdown menu.
  5. On the Create Mapping window, for Domain Object Field, find and select Id.
  6. Click Save & New to add more mappings.
  7. Repeat steps 3 to 6 and add these mapping data. After you enter the last mapping details, click Add on the Create Mapping window.

JSON Input Path

Domain Object

Domain Object Field

UpdatedShippingMethod

1 - Order

Shipping_Method__c

UpdatedShippingCountry

1 - Order

ShippingCountry

UpdatedStatus

1 - Order

Status

UpdatedShippingCity

1 - Order

ShippingCity

UpdatedShippingState

1 - Order

ShippingState

UpdatedShippingPostalCode

1 - Order

ShippingPostalCode

UpdatedShippingStreet

1 - Order

ShippingStreet

Your DMLUpdateOrderDetails data mapper is now ready. You’ll configure the JSON input paths in the Omniscript later in the Order Data Modification with Omnistudio Omniscripts badge.

Wrap Up

In this badge, you learned about the example scenario and the customer requirements. You got an overview of the scenario workflow and the things you do as part of this badge series. You also learned how to build data mappers to fetch, transform, and update order data.

But you’re not done yet. Complete the Order and Country Data Processing with Omnistudio Integration Procedures badge to learn how to create Integration Procedures to perform data operations and serve the data to Flexcards and Omniscript.

Salesforce 도움말에서 Trailhead 피드백을 공유하세요.

Trailhead에 관한 여러분의 의견에 귀 기울이겠습니다. 이제 Salesforce 도움말 사이트에서 언제든지 새로운 피드백 양식을 작성할 수 있습니다.

자세히 알아보기 의견 공유하기