Skip navigation
All Places > Marketo Whisperer: Implementation Tips

If you use Record Types in SFDC, you can set the Record Type ID in Marketo. Set the value before using the “Sync Lead to SFDC” flow step. Insert the 18-character ID, not the name of the Record Type.

Work with your SFDC Admin to get the Record Types IDs and to determine the logic for which records should get which IDs.  Since the Record Type is a lookup field it will contain an ID instead of a name. Here is an interesting article about viewing the name.

Using the Auto-Assignment (Lead Assignment) rules in SFDC is recommended rather than creating assignment rules in Marketo.

 

Since creating assignment rules in Marketo is difficult to maintain, I recommend marketers focus on marketing rather than maintenance.

 

Lead Assignment rules only run on initial Lead creation, you can’t run them again for existing Leads. Thus, if a SFDC Lead or Contact flows through the Sync Lead to SFDC flow step and the Assign To is set to --Use Auto-Assignment Rules--, Marketo will sync any field updates but will not run the record through SFDCs assignment rules again.

 

If you need to run Assignment rules again, have your SFDC Admin create a custom trigger and flow in SFDC.

 

The SFDC Lead Assignment rules may required that specific fields be populated. Check with your SFDC Admin.

 

Here is an interesting idea about enhancing how the flow step works.

Here are some tips on using the Sync Lead to SFDC flow step to insert a Marketo only record into SFDC:

  1. All records in Marketo should have an email address.
  2. If someone will be calling the lead remember to capture the phone number before inserting the record into SFDC.
  3. Make sure your records have values for SFDC’s required fields Company & Last Name otherwise SFDC will reject the record. I recommend working with your lead follow-up team before deciding to insert new records using default values. You don't want your sales team complaining that the default value is worthless. You can set default values if you have admin privileges. Go to Admin> Salesforce> Sync Options and set a default value for the Default Lead Company. Marketo will pass this value in the sync when the company name is not otherwise provided, which will prevent the sync from breaking.
  4. Determine if there are any validation rules for new records.
  5. Learn how your SFDC assignment rules work and determine whether you need country, state, postal code, industry or any other information to properly route the record.
  6. Determine if you should assign your records using auto-assignment or set to a specific user or queue.
    • Caution: Salesforce does not allow "Contacts" to be assigned to lead queues.  In this case Marketo will create a duplicate "Lead" in Salesforce. Thus, be careful of allowing SFDC Contacts in Marketo to flow through a smart campaign using the Sync Lead to SFDC flow step and assigning the record to a queue.
  7. Determine if you should set the Lead Status to a default value like "Marketing Qualified Lead."
  8. Remember Marketo can only insert new records into SFDC as Leads, not Contacts.
  9. If you are also going to add the record to a SFDC Campaign, make sure the Sync Lead to SFDC flow step happens first.
  10. To make it easy to troubleshoot issues in the future I recommend documenting everything.
  11. Ideally it is best to test using a Marketo and SFDC sandbox. If you don't have a sandbox, at least sync up with your lead follow-up about your testing and use a naming convention so you can easily delete all the tests later.

 

When to Use the Flow Step

When I first started using Marketo I ran a lot of online events. I was generating a lot of new leads and all the important fields on my form for routing such as state, country, phone were required. I pushed the records to sales immediately in the same triggered smart campaign I used to send out the confirmation email. Today most people use a centralized campaign to insert their Marketo only records into SFDC. Using a centralized campaign is better if you are using a scoring threshold to decide whether a record should be synced to SFDC. It also makes it easier to trouble shoot issues.

 

Here are some additional resources for learning about the Marketo integration with SFDC.

Merging fields is a trick Marketo support and services can do to combine a Marketo only field with a SFDC field.

 

Example:

Marketo won’t be able to merge a field if the type doesn’t match the field you are merging with. Thus, they can only merge a string field with a string field. They won’t be able to merge a date with a datetime field.

 

They won’t be able to merge a field if it is in use.

When they merge fields you need to determine which field you are merging with, it is called this the Target Field. You also need to choose which value will win.

Merging fields may take some time and once started it cannot be canceled. Once the merge is completed the merged field will no longer exist in Marketo.

 

Important: If you are in the process of integrating/syncing SFDC with Marketo for the first time, I highly recommend you merge the fields before you start the record sync between SFDC and Marketo. Since merging fields takes time I recommend building this task into your implementation schedule.

 

Checklist of information to provide Marketo professional services.

  • Names of  the fields to be merged.
  • Confirm the two merged fields are of the same field type
  • Confirm all the fields to be merged are not being using in any smart lists/campaigns
  • Determine which value will win for each merge

 

Additional resources for learning about the Marketo integration with SFDC.

Here are the instructions for Admins to change the type of a Marketo field.

 

You can only change the field type for custom fields. A notification will appear letting you know if you won’t be able to change type. Records may need to be updated if a trigger campaign fires while the CDV flow step is removed.

You won’t be able to change the field if it is in use including being used in a CDV flow step.

You can’t change a score or formula field.

The values of the field may be cleared when you change the field type. The warning message you see will vary depending on what Field Type you're changing from/to.

To preserve the data, you will want  to export it and re-import it after you change the field type. You may need to change the format of the value, depending on what the date field will accept and how the value is formatted now. In order to change the field type you'd need to remove it from all assets currently referencing it as well, so if you have a lot it might be easier to create a new field and start using that one instead.

 

Summary of typical field type changes

 

Current Type

Change to

Allowed

Existing Data Will be Lost

String

Score

Yes

Yes

Score

String

No

N/A

String

Boolean

Yes

Yes – All new values will be false

Boolean

String

Yes

Yes

String

Integer

Yes

Yes

Integer

String

Yes

No

Integer

Score

Yes

No

Score

Integer

No

N/A

Date

Datetime

Yes

Yes

Datetime

Date

Yes

Yes

String

Email

Yes

No

Email

String

Yes

No

String

Text (Aka Text Area)

Yes

No

Text

String

Yes

No – Values may be truncated

Formula

Anything

No

N/A

 

Additional resources for learning about the Marketo integration with SFDC.

Marketo has the ability to merge a SFDC Lead with a Contact record if the Marketo user has the “Merge Leads” permission and the Marketo user profile in SFDC has the ability to covert leads, create contacts, accounts and opportunities.

 

If a Lead and Contact are merged in Marketo, the Lead will first be converted into a Contact, then merged with the other Contact. The Contact is the primary record.

I do not recommend allowing the Marketo profile to convert SFDC leads to contacts. Marketo will automatically create a new account and opportunity. Marketo cannot convert the Lead into an existing Account, because it would not know which Account to associate the converted record.

 

When you merge records in Marketo, in the case of conflicts you can choose which value to keep. If you don't want either value, you can check Custom and enter a value of your choice. Thus, you get to choose which scoring values you want or you can enter a new value.

After the Merge

The default Lead Score field and all other custom score fields are not added up since you chose the score to keep during the merge. The complete activity logs will be merged in Marketo including membership in all programs. Last Interesting Moments will be merged in Sales Insight.

 

Here is a detailed article by Grant Booth on understanding merges in Marketo.

 

Here is more information about using the Convert Lead flow step.

 

When to Use Marketo to Merge Records

I recommend only using Marketo to merge records if one of the records is in Marketo only. If two or more records are in SFDC, you should use SFDC to merge the records since all the SFDC fields might not be synced to Marketo and you won't be able to address those field conflicts.

I've talked before about using Postman to make REST API calls, and it's perfectly fine for one off calls for testing.. but what about those times when you need a full on programming language to upsert leads or custom objects, or perform some other function using the REST API? Well, you can write your own libraries to make it easier, or you can leverage the Marketo Rest Python library, maintained by our very own Jep Castelein

 

This article will serve as a step by step guide for getting up and running and making basic hello world calls using Python.

 

Products

We'll be using the following, all of which are free.

Python 3.5.1

pip for Python - A great installer program we'll use to install the library

Marketo-Python-REST library

PyCharm - A great Free IDE (the Community Edition is free)

 

Step 1 - Python 3.5.1

On the OSX 10.1, you'll notice that python comes pre installed, but its perfectly acceptable to run more than one version of Python. Download the Python 3.5.1 DMG file and install it. Make sure it installed by opening up a terminal and typing python3. Simple!

 

Step 2 - PIP

You can follow the directions here, downloading get-pip.py from https://bootstrap.pypa.io/get-pip.py , then running the following command, making sure you run it against Python 3.51 as follows

python3 get-pip.py

Seriously. It's that easy.

 

Step 3 - The Marketo Rest Python Library

Again, very simple. At the command line, ensure you have pip installed by typing

pip -V

It should indicate that you're installed on version 3.5.1

 

Next, type the following

pip install marketorestpython

 

It should look rather like this:

Screen Shot 2016-03-30 at 5.05.31 PM.png

 

Step 4 - PyCharm

You guessed it. Download the dmg file for mac, and install it.

Create a project called "Marketo Python" and get creative.. maybe you want to set up folders for your different tasks. For this one, I created a hello world folder

skitch-2.png

 

Create a new file, and enter the following substituting your own Marketo instance credentials

 

from marketorestpython.client import MarketoClient

munchkin_id = "your value"
client_id = "your value"
client_secret = "your value"
mc = MarketoClient(munchkin_id, client_id, client_secret)

lead = mc.execute(method='get_lead_by_id', id= 1001)

print(lead)

 

The library is quite well documented here.. so get creative! Let us know in the comments how you're using it! https://github.com/jepcastelein/marketo-rest-python

 

Update!

If you get an error like "HTTP Get Exception! Retrying....." and / or "SSLV3_ALERT_HANDSHAKE_FAILURE" in Mac OS Sierra, you likely need Install requests with extra security packages using: pip install requests[security]. It's further discussed in this requests issue on github.

A Marketo user has the ability to merge a Marketo record together with a SFDC Lead or Contact record if the Marketo user has the “Merge Leads” permission. Merging can only be done manually since the Marketo user will need to address any field value conflicts that may arise. There is no flow step to merge records in Marketo in bulk.

 

 

When you merge records in Marketo, in the case of conflicts you can choose which value to keep. If you don't want either value, you can check Custom and enter a value of your choice. Thus, you get to choose which scoring values you want or you can enter a new value.

 

 

After the Merge

The default Lead Score field and all other custom score fields are not added up since you chose the score to keep during the merge. The complete activity logs will be merged in Marketo including membership in all programs. Last Interesting Moments will be merged in Sales Insight.

 

Here is a detailed article by Grant Booth on understanding merges in Marketo.

 

When to Use Marketo to Merge Records

I recommend only using Marketo to merge records if one of the records is in Marketo only. If two or more records are in SFDC, you should use SFDC to merge the records since all the SFDC fields might not be synced to Marketo and you won't be able to address those field conflicts.

 

If you have a lot duplicates to manually merge, contact services@marketo.com and ask about our Easy Merge service.

If there are duplicate records based on email address in SFDC both will appear in Marketo.

 

Marketo doesn’t de-dupe records coming from SFDC since we view the duplicates created in SFDC as intended behavior. When you merge SFDC lead or contacts records in SFDC, in general, the master record prevails, but in case of conflicts you can choose which values to keep.

 

After Merging of Leads or Contacts In SFDC

The default Lead Score field is added up. For example, merging 3 SFDC leads with scores of 10 each, will yield a result of 1 lead with a score of 30. This only applies to the standard Lead Score field. Custom score fields will not be added up. The custom score fields will retain the value of the master record unless you choose a value from a different record. One solution is to create another score field called “Total Lead Score” and not use the default Lead Score field.

 

The complete activity logs will be merged in Marketo including membership in all programs.

 

Even though the SFDC user chooses a Last Interesting Moment during the SFDC merge, a history of all Interesting Moments will appear in Sales Insight.

 

Additional Information

Here is a great article which explains how to merge leads in SFDC.  Here is the article for merging contacts in SFDC.

 

One way to identify merged records in Marketo is to use the filter "Lead Was Created" and add the constraint on Min. Number of Times = 2 within your timeframe.

 

Here is a different method to identify merged records by Jason Martin.

 

Lastly, here is a detailed article by Grant Booth on understanding merges in Marketo.

 

Where to Merge Records

Merging duplicates in Marketo might not be possible due to your SFDC profile settings for the Marketo user. If all SFDC fields are not synced to Marketo it is recommended to merge records in SFDC vs Marketo so any field conflicts will be addressed.

Picklists from a SFDC field will show up as values on a Marketo form if you change the field type of the field in the form to Select.

 

Only values common to both Lead & Contact/Account will appear in the Marketo picklist.

 

Changes to a picklist in SFDC will not change the picklist of an existing form in Marketo. If a picklist in SFDC changes a notification will appear in Marketo and the Marketo landing page will automatically move to draft. You will need to update each Marketo form and re-approve all landing pages using the form. Any new forms you create should show the updated picklist for your SFDC field.

 

Here is more information about updating a picklist field in SFDC.

 

Additional resources for learning about the Marketo integration with SFDC.

Field types from SFDC fields are automatically mapped to field types in Marketo.

 

SFDC Field

Marketo Field Type

Text

String

Long Text Area

Text

Checkbox

Boolean

Picklist

String

Number

Integer but can be changed to Score

Date

Date

Date/Time

Datetime

 

You can change the field type in Marketo for custom fields as long as the field is not in use.

 

Common use case: Create a number field in SFDC for Behavioral Score on the lead and contact records and change it to a Score field in Marketo.

 

Here are some of the field types in Marketo. A full glossary can be found here.

 

 

When you change a field type in Marketo the data may be deleted. To preserve the data, you will want to export it and re-import it after you change the field type. You may need to change the format of the value, depending on what the date field will accept and how the string is formatted now. In order to change the field type you'd need to remove it from all assets currently referencing it as well, so if you have a lot it might be easier to create a new field and start using that one instead. Additional information can be found here.

 

Implications of changing a field's type in SFDC.

 

Additional resources for learning about the Marketo integration with SFDC.

SFDC Opt-Out field on the Lead and Contact Objects is mapped to the Marketo Unsubscribed field.

 

Whenever a sales rep checks the SFDC Email Opt Out box, the Lead will be unsubscribed in Marketo.

If the Unsubscribed field in Marketo changes to false the Email Opt Out field in SFDC will change as well.

 

Marketo has a “True opt-out” policy. If one record is unsubscribed, Marketo will automatically unsubscribe all records with a matching email address. The data value change will be noted in the Marketo activity log for each of the records.

 

If you delete the unsubscribed record from Marketo, when a new lead is created in Marketo from any source (e.g. inserted via SFDC or API, form submission, list import or manually created, we check it against your Marketo instance master email status table.  If the lead was unsubscribed when you deleted it in Marketo, we will update the record to be unsubscribed. If you set Unsubscribed to false using a hidden field on the form or smart campaign the master email status table will be updated. Thus, if you delete the record and Unsubscribed is false and the record is created again in Marketo the Unsubscribed field will remain false.

 

Here is a great article about durable unsubscribes by Raul Fonseca.

 

Please check out the community for the different ways to re-subscribe records in Marketo for records caught by the durable unsubscribe rule.

 

Additional resources for learning about the Marketo integration with SFDC.

Changing the type of a SFDC field is one of the reasons why landing pages are put into draft mode automatically by Marketo.

 

Change to Field

Marketo Form Automatically Re-Approved

Marketo Landing Page Automatically Moved to Draft

Length of text field increased

Yes

Yes

Length of text field decreased

No

No

Field type changed from Text (50) to Text Area (255)

Yes

Yes

Field type change from Text Area to Text

No

No

Picklist changed

Yes

Yes

Field type changed from Picklist to Text

No

No

Field type changed from Text to Picklist

Yes

Yes

 

In all the cases above the field type in Marketo will remain a string. Since the field type won't need to be changed in Marketo the values of the field will remain.

 

If you change the type of a SFDC field from text to checkbox or date/time, the field type change doesn’t happen automatically in Marketo. A manual change is required in Marketo in order to properly sync to the right field type. When you change a field type in Marketo the data may be deleted. To preserve the data, you will want  to export it and re-import it after you change the field type. You may need to change the format of the value, depending on what the date field will accept and how the value is formatted now. In order to change the field type you'd need to remove it from all assets currently referencing it as well, so if you have a lot it might be easier to create a new field and start using that one instead.

 

Marketo change field type article.

 

When the length of a field is changed you should see the following notification in Marketo:

Subject: Salesforce Sync Warning: Change in Salesforce Field

Why: One or more fields has been changed in Salesforce.com

Error details: The following fields have been changed:

•  System of Interest

•  maximum length changed - old value: '50', new value: '100'

These fields appear in the following forms/landing pages:

APAC-JP-2015-05-10 Getting Started Webinar - Assets.01 Registration Page

 

When a picklist is changed you should see the following notification in Marketo:

Subject: Salesforce Sync Warning: Change in Salesforce Field

Why: One or more fields has been changed in Salesforce.com

Error details: The following fields have been changed:

•  Industry picklist entries changed

These fields appear in the following forms/landing pages:

• NAM-2016-04-11 Webinar - Assets.01 Registration Page

 

Finally, here is information about changing the type of a field using Marketo.

 

Additional resources for learning about the Marketo integration with SFDC.

When a record is converted in SFDC from a lead to a contact Marketo automatically changes the SFDC Type field from Lead to Contact.

 

The change in SFDC type doesn’t cause a data value change so the Data Value Changes trigger and filter won’t work for SFDC Type. You will need to use the Lead is Converted trigger or Lead was Converted.

 

 

Alternatively you could use a different field such as Lead Status = Converted.

 

Make sure your lead custom fields are mapped.

 

During the conversion the Marketo ID stays with the record converted to a contact.

Previously I talked about creating nested SPF entries, but as was pointed out to me by our excellent deliverability team and Kiersti Esparza specifically.. there is another way to handle this, and there are a few things we commonly see as misconfigurations and causes of breakage with SPF, and I'll talk about them here! If you have a large set of IPs and or domains and want to include them ALL in SPF, it can get out of hand quite quickly.

 

Character String Length

SPF records have a limit of 255 characters in a single string. Any more than that and the record will come back as invalid. We have some workarounds, however...

 

Approach 1 - Multiple Strings

To have more than 255 characters in an SPD record, the record can be broken into multiple strings. The strings are then concatenated together, without spaces, as shown.

 

IN TXT "v=spf1 .... first" " second string..."

MUST be treated as equivalent to

IN TXT "v=spf1 .... first second string..."

 

EXAMPLE

text = "v=spf1 ip4:199.15.212.0/22 ip4:72.3.185.0/24 ip4:72.32.154.0/24 ip4:72.32.217.0/24 ip4:72.32.243.0/24 ip4:94.236.119.0/26  ip4:37.188.97.188/32 ip4:185.28.196.0/22 ~all"

(could be)

text = "v=spf1 ip4:199.15.212.0/22" " ip4:72.3.185.0/24 ip4:72.32.154.0/24 ip4:72.32.217.0/24" " ip4:72.32.243.0/24 ip4:94.236.119.0/26" " ip4:37.188.97.188/32 ip4:185.28.196.0/22 ~all"

 

Approach 2 - Some more detail on the previous blog - Nested or Cascaded entries

This example if for Marketo.com, and you can see that marketo.com is the top level SPF entry.

In this case, the marketo.com SPF record includes a number of other, different SPF records.  (include:_spf.salesforce.com include:spf.protection.outlook.com include:mktomail.com include:email.influitive.com include:stspg-customer.com)

 

All entries in the “included” entries are now considered to be part of the marketo.com record.

 

A great tool to see all nested records in an SPF record is the DMARCIAN SPF Surveyor.

 

Screen Shot 2016-03-24 at 11.05.19 AM.png

Screen Shot 2016-03-24 at 11.05.31 AM.pngCaveat: This approach has limits There is a limit of 10 additional “include:” records in an SPF record. The "include", "a", "mx", "ptr", and "exists" mechanisms as well as the "redirect" modifier count against this limit of 10, but the "all", "ip4", and "ip6" mechanisms do not count against this limit.

 

Also remember, when you “include:” a record in your SPF record, then your record now includes all mechanisms in the “include:” record.  So if your SPF record has 1 “include:”, but the SPF record you are including has 10 already, then your record will now have 11 and will break!

 

Null Records in the SPF Record

A record that is NULL or does not exist will break an SPF record.  This means be extra careful about typos in your record.  If you “include:” a domain that doesn’t exist, this will break your record.

 

Repetitive Records in the SPF Record

In order to prevent against unnecessary processing that can cause mail systems to slow down repeated mechanisms aren’t allowed.  There is a MAX of 2 repeated look ups in an SPF record.  More than that and the record will break.  This prevents SPF records from being used in Denial of Service style attacks.

 

If we have learned anything at Marketo over the years it is that DNS for email is hard!  We have experts on our team who can help unravel the most complicated SPF records.  Raise your hand and let us know if you need help.