Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Integration Cloud | Recipes | Marketo to SAP C4C Leads Data Sync
 
Marketo to SAP C4C Leads Data Sync
This section describes the recipe for the data sync between Marketo Lead business object and SAP Cloud for Customer Lead 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 a qualified Lead (based on the Lead Score) from Marketo and sync the Lead into SAP Cloud for Customer.
Configuring Smart campaign and Webhooks in Marketo
1. Webhooks
a. Once logged in to Marketo, go to Admin->Webhooks to see the below page:
b. Click New Webhook and fill the required fields.
For URL, enter https://<<ICInstance>>/integration/rest/external/integration/submit/<<StageOfIntegration>>/<<IntegrationName>> and select Request Type as "POST".
c. Under Template, paste the following content:
{"createLead":"true","LeadID":"{{lead.id}}","C4C_Contact_ID":"
{{lead.c4CContactID}}","CompanyInfo":{"CompanyName":"{{company.Company Name}}",
"CompanyID":"{{company.externalCompanyId}}","CompanyNotes":"
{{company.companyNotes}}","ExternalSalesPersonID":"{{company.externalSalesPersonId}}"
,"MainPhone":"{{company.mainPhone}}","Website":"{{company.website}}",
"AccountHouseNumber":"{{company.accountHouseNo}}","NumberOfEmployees":"
{{company.numberOfEmployees:default=0}}","CompanyCity":"{{company.billingCity}}",
"ID":"{{company.id:default=0}}","CompanyCountry":"{{company.billingCountry}}",
"CompanyPostalCode":"{{company.billingPostalCode}}","CompanyState":"
{{company.billingState}}","CompanyStreet":"{{company.billingStreet}}",
"CompanyIndustry":"{{company.industry}}"},"LeadDescription":"{{lead.leadDescription}
}","lastName":"{{lead.Last Name}}","firstName":"{{lead.First Name}}"}
d. Select Request Token Encoding as None, and select Response type as JSON.
e. Click Create.
The following image is a screen shot of the Create Webhook page:
2. Smart Campaign
a. Navigate to Marketing Activities and click New Smart Campaign.
b. Select a folder and enter the Name, Description, and click Create.
The following image displays the WebhookTestCampaign window:
c. Click Smart List tab and on the right pane select Score is Changed trigger, and drop it under the Smart List tab.
For the default Score Name constraint, select condition as is and enter the value as Person Score.
d. Click Add Constraint menu, to add a New Score constraint.
Under New Score, select the condition as greater than and the value as 60.
A sample screenshot is shown below:
e. Click on the Flow tab.
On the right side pane, select Call Webhook under Integration and drop it under the Flow tab.
f. Select the web hook created in 2.1.1. A sample screen shot is shown below:
g. Click on the Schedule tab and click Activate:
Product Compatibility
The recipe is tested for the SAP Cloud for Customer product version 1908.04.0006. Hence the recipe is compatible to run for the tested and also older versions of the product.
Data Sync Flow
This integration "MarketoToSAPC4CLeadsDataSync" is designed to run for real-time sync using Webhooks and Smart Campaigns in Marketo. Based on the Lead input from Marketo, appropriate Accounts, Contacts, and Leads should be created in SAP C4C.
The following flow diagram represents the same:
Operations Used
1. SAP C4C
SL.NO
Operation Name
Description
Query
Notes
1
queryAccounts_
MarketoLeadTo
SAPC4CLea
Query SAP
C4C Accounts
AccountID eq '%C4C_Account_ID%'
Name eq '%CompanyName%'
.
2
queryContacts_
MarketoLeadTo
SAPC4CLea
Query Contacts
from SAP C4C
ContactID eq '%C4C_Contact_ID%'
FirstName eq '%firstName%' and LastName eq '%lastName%'
LastName eq '%lastName%'
3
createLeanLead_
MarketoLeadTo
SAPC4CLe
Create a Lead
in SAP C4C
NA
4
patchContact_
MarketoLeadTo
SAPC4CLead
Patch Contact to
a Particular Account in SAP C4C
NA
5
getCorporateAccount
CountryCode
Get list of Country
codes for Account object defined
in SAP C4C
NA
Caching
enabled
6
getCorporateAccount
IndustrialSecCode
Get list of Industry Codes
for Account object defined in SAP C4C
NA
Caching
enabled
7
getCorporateAccount
StateCode
Get list of State codes
for Account object defined in SAP C4C
NA
Caching
enabled
8
getContactBusiness
AddressCountryCode
Get list of Country codes
for Contact object defined in SAP C4C
NA
Caching
enabled
9
getContactBusiness
AddressStateCode
Get list of State codes
for Contact object defined in SAP C4C
NA
Caching
enabled
10
getContactStatusCode
Get list of Status codes
for Contact object defined in SAP C4C
NA
Caching
enabled
11
getContactSalutation
Get list of Salutation codes
for Contact object defined in SAP C4C
NA
Caching
enabled
12
getContactDepartment
Codes
Get list of Department
codes for Contact object defined in SAP C4C
NA
Caching
enabled
13
createContact_
MarketoLeadToSAPC4CLea
Create Contact in
SAP C4C
NA
14
createCorporateAccount
HasContactPers
Link a Contact to a
Department
NA
15
createContact
TextCollection
Link Person notes to a
Contact
NA
16
createAcc_MarketoLeadTo
SAPC4CLeads
Create a Prospect in
SAP C4C
NA
17
createCorporateAccount
TextCollection
Link Company notes
to an Account
NA
18
createCorporate
AccountTeam
Link a SalesPersonID
to Owner in an Account
NA
Marketo
SL.No
Parameter
Description
Query
1
getLeadById_
MarketoLeadToSAPC4CLeads
Get Lead information for
a matching ID.
NA
2
upsertLead_
MarketoLeadToSAPC4CLeads
Update a Marketo Lead/Person
with created Contact in SAP C4C
NA