Integration Cloud 6.1.0 | Recipes | SAP C4C to Marketo Opportunity Data Sync
 
SAP C4C to Marketo Opportunity Data Sync
This section describes the recipe for the data sync between SAP Cloud for Customer Opportunity business object and Marketo Opportunity business object.
SAP Cloud for Customer (C4C) is a cloud solution to manage customer sales, customer service, and marketing activities efficiently and is one of the key SAP solutions to manage customer relationships.
Marketo provides software platforms and technologies designed for marketing departments such as account-based marketing, which includes email, mobile, social, digital ads, web management, and analytics.
Business Use Case
The business purpose of this integration is to extract SAP Cloud for Customer Opportunity records and upsert them into Marketo as Opportunity records with related Company and Salesperson and then create Marketo Opportunity Contact Role records with a dependency on Marketo Lead, based on the associated Contact of SAP Cloud for Customer.
Custom Fields
The Opportunity object needs to be created or upserted in SAP C4C with the below mentioned custom fields. Similarly, when the Opportunity object gets synced in Marketo, it needs to be created or updated with the below mentioned custom fields. The required custom fields are as follows:
On SAP C4C
Comments
zTotalNegotiatedValueConvertedcontent
Custom field needs to be created in SAP C4C to hold the Amount for Marketo Opportunity record.
zWeightedValueConvertedcontent
Custom field needs to be created in SAP C4C to hold the ExpectedRevenue for Marketo Opportunity record.
ZFiscalQuarter
Custom field needs to be created in SAP C4C to hold the FiscalQuarter for Marketo Opportunity record.
ZFiscalYear
Custom field needs to be created in SAP C4C to hold the FiscalYear for Marketo Opportunity record.
Fiscal
Custom field needs to be created in SAP C4C to hold the Fiscal for Marketo Opportunity record.
On Marketo
Comments
c4COpptID
Custom field in Marketo for Opportunity record to hold the SAP C4C Opportunity record ID.
opportunityObjectID
Custom field in Marketo for Opportunity record to hold the SAP C4C Opportunity record ObjectID
Required recipes to run before Opportunity
SAP C4C
Marketo
Required Fields
Comments
Employee
SalesPerson
externalSalesPersonID
If employee is synched in Marketo, then only the Opportunity owner will be updated at Marketo from SAP C4C.
Account
Company
externalCompanyID (SAP ProspectPartyID)
If account is synced in Marketo, then only the Opportunity company will be updated at Marketo from SAP C4C.
Contact
Lead
c4CContactID (SAP PrimaryContactPartyID)
If contact is synced in Marketo, then only the Opportunity will be upserted at Marketo from SAP C4C.
Product Compatibility
The recipe is tested for SAP Cloud for Customer product version 1908.04.0006. Hence the recipe is compatible to run for the tested and older versions of the product.
Data Sync Flow
This integration "SAPC4CToMarketoOpportunityDataSync" is designed to run for initial as well as ongoing sync. As part of the initial sync, all the Opportunity records present in SAP C4C will be synced to Marketo. On the other hand, as part of the ongoing sync, the updated or newly created Opportunity records will be synced to Marketo for the provided date range.
The following diagram represents creating a Opportunity in Marketo from an Opportunity in SAP C4C:
Input Parameters
Sl.No
Parameter
Description
1
isInitialSync
Set to true in case of initial sync and to false in case of ongoing sync (true/false).
2
syncInterval
The sync interval can be entered either in hours/minutes/seconds or all of them and corresponding pattern and time zone if required.
3
logRecordStatusFlag
The log status of each record processed. It can either be true or false.
Operations Used
Sl.No
Operations Used
Application
Description
1
QueryOpportunity
SAP C4C
Query SAP C4C Opportunity.
2
queryLead
Marketo
Query Lead from Marketo.
3
queryEmployee
SAP C4C
Query Employee from SAP C4C.
4
upsertOpportunities
Marketo
Upsert opportunities in Marketo.
5
upsertMarketoOpportunityRoles
Marketo
Upsert Opportunity Roles in Marketo.
1. QueryOpportunity
Input Filter parameter
*IsInitialSync = True: ProspectPartyID ne null and MainEmployeeResponsiblePartyID ne null
*IsInitialSync = False: ProspectPartyID ne null and MainEmployeeResponsiblePartyID ne null and ETag ge datetimeoffset'%fromDateString%'
Note:
Pagination will be done based on this operation. 100 records per API Call.
2. queryLead
*QueryLead based on c4CCustomerID(CustomField) Identifier. This operation will provide related Marketo Lead(id), which will be mapped to leadId in upsertOpportunities operation.
*QueryLead based on c4CCustomerID(CustomField) Identifier. This operation will provide related Marketo Lead(id), which will be mapped to leadId in upsertMarketoOpportunitiesRoles operation.
3. queryEmployee
queryEmployee based on filter constructed with BusinessPartnerIDs to obtain Employee ID in SAP C4C. This operation will provide the related Employee ID, which will be mapped to externalSalesPersonId in upsertOpportunities operation.
Note:
The required response data of queryOpportunity, queryLead, and queryEmployee will be stored in toList[].
a. upsertOpportunities
Field Mapping
SAP - OPPORTUNITY
Source (ToList)
Field Type
MKTO -
OPPORTUNITY
Field Type
CreationDate
Standard
externalCreatedDate
Standard
ExpectedProcessingEndDate
Standard
closeDate
Standard
ID
Standard
externalOpportunityId
Standard
ID
Standard
c4COpptID
Custom
LifeCycleStatusCodeText
Standard
Stage
Standard
Name
Standard
description
Standard
ProspectPartyID
Standard
externalCompanyId
Standard
ProbabilityPercent
Standard
probability
Standard
Fiscal_KUT
Custom
fiscal
Standard
ZFiscalQuarter_KUT
Custom
fiscalQuarter
Standard
zTotalNegotiatedValue
Convertedcontent_KUT
Custom
amount
Standard
zWeightedValue
Convertedcontent_KUT
Custom
expectedRevenue
Standard
isClosed
Transformed from
standard field
StausCodeText
isClosed
Standard
isWon
Transformed from
standard field
StausCodeText
isWon
Standard
ZFiscalYear_KUT
Custom
fiscalYear
Standard
externalSalesPersonId
Mapped from
/queryLeadOutput/leads/
externalSalesPersonId
externalSalesPersonId
Standard
SalesForecastCategoryCodeText
Standard
forecastCategoryName
Standard
ObjectID
Standard
opportunityObjectID
Custom
Note:
Pagination will be done based on this operation. 100 records per API Call.
4. QueryOpportunity
UpsertMarketoOpportunity is a very important step in syncing opportunities as opportunities will appear on Marketo UI only if contact roles are synced. Without this operation, the relationship between lead and opportunity is not defined.
*One opportunity can be related to many contacts with different or same roles.
*One opportunity will have only one primary contact and can be related to same contact with multiple roles.
*One opportunity can be related to contacts with or without roles. In cases where roles are not defined in the SAP C4C side, those records will be skipped while creating the opportunity role.
*In an opportunity, for every contact role, there will be a new entry of opportunityrole (Opportunity Info tab. See activities logs for further clarification at Marketo side.)
Note:
The required response data of queryOpportunity/$expand and queryLead will be stored in toList[].
FileMapping
Source (ToList)
Field Type
MKTO - OPPORTUNITY
Role
Field Type
OpportunityPartyContact
MainIndicator
Standard
isPrimary
Standard
OpportunityId
Standard
externalOpportunityId
Standard
LeadID
Standard
leadId
Standard
RoleCodeTest
Standard
role
Standard
Usage Notes
*In order to add new standard or custom fields to the integration, copy the required field to the respective toList array, and proceed with mapping from the respective toList array to the desired field.
*In order to change or remove standard or custom fields from the integration, remove the required field mapping and change or remove the field from the respective toList array.