Approach 1: Migrate data from Salesforce to Workday using a Joiner transformation
When you write opportunity data to Workday, you can add the opportunity line element as a Salesforce object along with the opportunity object in the transformation.
Use a Joiner transformation to join the data from the Salesforce opportunity and opportunity line objects before you write that data to Workday. Add the IDs as processing options from the opportunity and opportunity line objects in an Expression transformation.
Creating connections
Create the source and target connections before you create a mapping.
Create a Salesforce Connection
You want to create a Salesforce connection to read data from Salesforce.
1Configure a Salesforce connection on the Connections page.
2Select type Salesforce.
3Configure the advanced properties to connect to Salesforce and save the connection.
The following image shows the configured Salesforce connection properties:
Create a Workday Connection
Create a Workday connection to write data to the Revenue Management module in Workday.
1Configure a Workday connection on the Connections page or in a wizard as you configure a task.
2Select type Workday.
3Configure the connection properties to connect to Workday and save the connection.
The following image shows the configured Workday connection properties:
Creating a mapping
Create a mapping to read data from the Opportunity object from Salesforce to Workday.
Use the Mapping Designer to configure the mapping. Add the opportunity and opportunity line elements as Salesforce objects in the transformation. When you create a mapping, configure the data flow of the opportunity and opportunity line objects from the Salesforce source to the Workday target.
When you configure the Source transformation, select Multiple Objects as the Source Type. Relate the OpportunityLineItem and Opportunity source objects, which joins both the objects. Add the IDs as processing options in an Expression transformation.
For other use cases that does not involve Salesforce as the source, you can use the Joiner transformation to relate different objects.
The following image shows the mapping m_SFDC-WDAY_Oppty_ClosedWon_D2H_MO with the Salesforce source that contains the joined objects, along with the Expression transformation required to write data to the Workday target:
Step 1. Add a Source transformation
Configure the opportunity and opportunity line Salesforce source objects.
1To create a mapping, click New.
2In the New Asset dialog box, click Mapping, and then click Create.
3In the Properties panel, enter the mapping name m_SFDC-WDAY_Oppty_ClosedWon_D2H.
The following image shows the configured mapping:
4To add an opportunity Source transformation, on the Transformation palette, click Source.
aIn the Properties panel, on the General tab, enter a name and description.
bClick the Source tab, and configure the source details.
cSelect the configured Salesforce connection.
dSelect Multiple Objects as the Source Type to add related objects. Select a primary object and add related objects from the menu.
eIn the Query Options section, specify the following filter to extract only the latest valid records of closed won status from Salesforce:
Opportunity.StageName='Closed Won' AND Opportunity.WDAY_Company_ID__c!=null and Opportunity.LastModifiedDate >= $LastRunTime
Note: In this example, WDAY_Company_ID is a custom field in Salesforce opportunity that references an existing Workday company. Use WDAY_Company_ID to select only the closed won opportunities with the requisite data references for successful Workday upsert.
The following image shows the configured source details:
The following image shows some of the fields of the opportunity object:
5Click Save.
Step 2. Add an Expression transformation
To write data to Workday, you must include reference fields that are originally not available in Salesforce. You must create custom fields to include the reference values. Add an Expression transformation to define the relationship of the incoming fields with the target fields. When you configure an expression field, you define the field name, data type, precision, and scale.
The field must contain an ID and type. The ID is the unique identifier for an instance of the object in Workday. Type refers to the type of ID value passed for the object in the expression that references the Workday data.
1In the Transformation palette, drag the Expression transformation onto the mapping canvas.
2On the General tab, you can enter a name and description.
3Draw a link to connect the previous transformation.
4On the Incoming Fields tab, you can configure the field rules that define the data that enters the transformation.
The following image shows the properties for each of the incoming fields:
5On the Expression tab, add the custom fields, and configure the expressions for each of the required fields.
6Add a new field, provide a name for the field, and select the Output field type and precision.
The following table is a sample of configured field names and the expressions for each of the field names:
Field Name
Expression
Description
o_Opty_Stage_Id_Type
'Opportunity_Status_Code'
Specifies the reference ID type used in Workday for opportunity status code.
The ID that corresponds to the reference ID type for Opportunity_Status_Code. For the stage name of Closed Won status in Salesforce, W is the corresponding value for the reference ID in Workday. For the stage name Closed Lost in Salesforce, L is the corresponding value for the reference ID in Workday. If the status is not Closed Won or Closed Lost, the value is O.
o_Currency_ID
'USD'
The ID that corresponds to the reference ID type for currency.
o_Currency_Id_Type
'Currency_ID'
Specifies the reference ID type used in Workday for currency.
o_UnitCost
To_char(OptL_UnitPrice)
Required field for the opportunity line data in Workday. Optionally converts number to string.
o_Quantity
To_char(OptL_Quantity)
Required field for the opportunity line data in Workday. Optionally converts number to string.
o_RevenueCategory
'Product'
For the opportunity line group, revenue category is the opportunity line type. Revenue category is a required field in Workday.
o_Inactive
0
Inactive = false indicates that the activity opportunity is active.
o_UpdateOnly
0
The Update_only field corresponds to the Update_Opportunity_Only target field, and determines whether you want to update only the opportunity data, or both the opportunity data and the opportunity line item data. You can decide the value based on what you require.
o_WDAY_Company_ID_Type
'Organization_Reference_ID'
Specifies the reference ID type used in Workday for company.
o_WDAY_Prospect_ID_Type
'Prospect_Reference_ID'
Specifies the reference ID type used in Workday for prospect.
Note: The custom fields, for example, addition of Revenue_Category field to include opportunity lines, is a sample implementation for this use case only. The requirements might vary and will not be consistent across implementations.