1. Installation Prerequisites
Before beginning your Marketo installation, please ensure the following prerequisites have been met:
- You have Admin Permissions on your Marketo system
- You have created a new Marketo API User (Admin -> Users & Roles -> Invite New User)
- Step 1: Credentials can be anything (suggestion: Email = integration@leadspace.com, First Name = Leadspace, Last Name = Integration)
- Step 2: Select "API Role" and the “API Only” checkbox
- Step 3: Click Send
- You have created a new Leadspace LaunchPoint (Admin -> LaunchPoint -> New -> New Service)
- Display Name: Leadspace API Service
- Service: Custom
- Description: Leadspace API Service
- API Only User: The user created above
- You have sent your Marketo details to support@leadspace.com
- Client Id and Client Secret (Admin -> LaunchPoint -> Leadspace API Service -> View Details)
- Endpoint and Identity (Admin -> Web Services -> REST API)
2. Create Validation Fields
- Go to Admin -> Field Management -> New Custom Field
- Create "LS System Status"
- Type: String
- Name: LS System Status
- Create "LS Updated"
- Type: Datetime
- Name: LS Updated
3. Create Webhook
- Go to Admin -> Webhooks -> New Webhook
- Webhook Name: Leadspace Enrichment
- URL: https://apigw.leadspace.com/v1/marketo/enrich/<APIKEY> (APIKEY to be provided by Leadspace Support)
- Request Type: POST
- Template:
- If you are using Intent:
{ "externalId": {{lead.id}}, "firstName": {{lead.First Name}}, "lastName": {{lead.Last Name}}, "email": {{lead.Email Address}}, "person.country": {{lead.LeadCountry}}, "companyName": {{company.Company Name}}, "companyWebsite": {{company.Website}}, "companyPhone": {{company.Main Phone}}, "companyCountry": {{company.Billing Country}}, "companyState": {{company.Billing State}}, "companyCity": {{company.Billing City}}, "customFields": { "First Lead Source": {{lead.FirstLeadSource}}, "Country Name": {{lead.countryName}}, "Combined Score": {{lead.combinedScore}}, "Lead Score": {{lead.leadScore1}}, "MQL": {{lead.mql}}, "Lead Status": {{lead.leadStatus}}, "Contact Status": {{lead.idcontactStatus}, "Name Created Date": {{lead.namedCreatedDate}} }, "enrichStatus": {{lead.lSSystemStatus}} }
- If you are NOT using Intent:
{ "externalId": {{lead.id}}, "firstName": {{lead.First Name}}, "lastName": {{lead.Last Name}}, "email": {{lead.Email Address}}, "person.country": {{lead.LeadCountry}}, "companyName": {{company.Company Name}}, "companyWebsite": {{company.Website}}, "companyPhone": {{company.Main Phone}}, "companyCountry": {{company.Billing Country}}, "companyState": {{company.Billing State}}, "companyCity": {{company.Billing City}}, "customFields": { "First Lead Source": {{lead.FirstLeadSource}}, "Country Name": {{lead.countryName}}, "Combined Score": {{lead.combinedScore}}, "Lead Score": {{lead.leadScore1}}, "MQL": {{lead.mql}}, "Lead Status": {{lead.leadStatus}}, "Contact Status": {{lead.idcontactStatus}, "Name Created Date": {{lead.namedCreatedDate}} }, "enrichStatus": {{lead.lSSystemStatus}}, "updated": {{lead.lSUpdated}} }
- If you are using Intent:
- Request Token Encoding: JSON
- Response Type: JSON
- Edit Response Mapping
- Response Attribute: lSSystemStatus
- Marketo Field: lSSystemStatus
- Click Webbooks Actions -> Set Custom Header
- Header: Content-type
- Value: application/json
4. Create Smart Campaign
- Go to Marketing Activities
- Create new folder "Enrichment New Leads" and new Smart Campaign "Leadspace On Demand Enrichment" inside folder
- Go to Smart List section
- Drag the "Campaign is Requested" trigger onto the canvas and keep filter as "Marketo Flow Action"
- Drag the "Campaign is Requested" trigger onto the canvas and keep filter as "Marketo Flow Action"
- Go to Flow section
- Drag the "Call Webhook" trigger onto the canvas and select the "Leadspace Enrichment" webhook
- Drag the "Call Webhook" trigger onto the canvas and select the "Leadspace Enrichment" webhook
- Go to Schedule section -> Edit Smart Campaign Settings
- Change "If lead has been in this Smart Campaign before" to "every time"
- Click Activate
- Change "If lead has been in this Smart Campaign before" to "every time"