SOLVED

Multiple Salesforce Custom Object records causing confusion!

Go to solution
Anonymous
Not applicable

Multiple Salesforce Custom Object records causing confusion!

Hi guys,

I need a smart list to select people based on their latest login date (which is stored in a 'User' custom object which sits off the Contact object in Salesforce). I'm using the 'Has User' filter and 'in past before' and 'in past' to get to a group of people whose login date was 180 days ago, and some of the people records I get returned are good - i.e. they have the correct Login date I would expect, and some don't, and some have no date at all. So we added another 'Has Platform User' filter to try and avoid those with no date at all...but it's not working. Is there some issue with this if the Contact has multiple User records? I need to find a way to filter down to a specific User record, and from there filter on the dates...but it doesn't do what I would expect it to.

And this got me thinking about how you are selecting audiences based on Opportunity data - because a Contact can be associated to multiple Opportunities - so again let's say I want to pick people who have a certain type of Opportunity record (we differentiate renewal and standard opportunities in Salesforce), within a specific date range - it's possible that a Contact might have multiple opportunities, and even multiple renewal opportunities, so how do you deal with the filtering out of older/other Opportunities in favour of specific ones, or how do you set up your filters so that only the ONE opportunity you want to reference is being used - and you're not just pulling people who meet the criteria on 3 or 4 of their Opportunity records? does that even make sense! 🙂

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Multiple Salesforce Custom Object records causing confusion!

Hi Michael,

Documenting the solution here in case someone searches the community.

when looking for any person that have 1 linked User CO that have a login date 1 year ago can be resolved with 3 smart list:

  1. SL1: has User, constraint: Login date in past 366 days
  2. SL2: has User, constraint: Login date in past 365 days
  3. Target list : member of Smart list in SL1 and member of smart list not in SL2

-Greg

View solution in original post

18 REPLIES 18
Jep_Castelein2
Level 10

Re: Multiple Salesforce Custom Object records causing confusion!

For both Custom Objects and Opportunities you need to put all your criteria in one Smart List filter. As soon as you put 2 filters on the page, they may match different Custom Object records, rather than applying all constraints on a single Custom Object record.

Anonymous
Not applicable

Re: Multiple Salesforce Custom Object records causing confusion!

I see what you're saying - but it's not possible - the Marketo doc says that when you're using things like 'in past before' in your date filter then you ARE going to pull people back who have NULL in the date field you're using. The suggestion to get round this is apply the 'is not empty' filter on the same field and as you can't reference the same field more than once in a single smart list filter there is no option to but to drag in another one and try to do it from there...

SanfordWhiteman
Level 10 - Community Moderator

Re: Multiple Salesforce Custom Object records causing confusion!

Add a new field with Boolean type, like hasLoggedIn, and additionally constrain on that.

Anonymous
Not applicable

Re: Multiple Salesforce Custom Object records causing confusion!

Yeah ok - I can see how that should work - but it's a workaround isn't it - because Marketo can't handle custom objects from Salesforce...which is a shame, because it's one of the main reasons we went with them in the first place...we were told, and also shown in some very simple examples, that it did work...that's a conversation with my Boss that I am not looking forward to...

Re: Multiple Salesforce Custom Object records causing confusion!

Hi Michael,

Yes, Marketo can handle custom objects from SFDC. It is just that when you add a new field, you need to map it so that it shows up in constraints for triggers or filters.

You have to go to the setup->salesforce custom object, stop the sync, refresh the schema, select the new fields and restart the sync. Also, you will have to force an update on the CO on the SFDC side so that they sync again with Marketo and the values in your new field shows up in Marketo.

-Greg

Anonymous
Not applicable

Re: Multiple Salesforce Custom Object records causing confusion!

Hi Greg,

yes, done all of that on the Marketo side..I will have to check on the Salesforce side that any change to the custom object triggers the update to the CO.

Here's the thing though - if I run a report in Salesforce of all Users who last logged in on the 8th March 2017 I get 17 records. If I run the same criteria in a smart list in Marketo - i.e. 'Has User' filter...constraint is 'last logged in date is the 8th March 2017' I get exactly the same people showing up in the results.

Now because we want this to be a scheduled rolling campaign I need to make this work so that it doesn't need amending each day, which is where I want to bring in 'in past before' and 'in past' - but then things go awry and I get additional people in the output...

I was also told by Marketo that the data for the custom object will show up in an Activity Log as an entry - 'Add to User' and that the data presented when you look at the detail of the activity is what the data was at the time of the initial sync. Any further change to the source data after this will NOT be visible to someone like me as a standard user - because the data in the Activity log is a snapshot in time and will never change, but I was assured that Marketo in the backend is tracking the data correctly.

So from the above, I can only assume that something is wrong with my 'in past before', and 'in past' logic...

MIke

Re: Multiple Salesforce Custom Object records causing confusion!

Hi Michael,

Would that work for you if you ran the campaign with a "run through the flow once" qualification rule ? In this case, it would not matter if the person would qualify multiple times in the SC, since they would only run through it the first time.

There was also the possibility to ask support to activate custom object update triggers for people who have migrated to the new infrastructure. But I do not know if this works only for Marketo CO's or of this can work for SFDC CO's as well.

-Greg

Anonymous
Not applicable

Re: Multiple Salesforce Custom Object records causing confusion!

Not sure I follow you - what would the smart list filter criteria be if not 'in past before' etc? The issue I have at the moment is that people are being returned by the criteria who do not fit the criteria and I really can't understand why that would be...

Re: Multiple Salesforce Custom Object records causing confusion!

Trying to get to a solution :

  • That SFDC user objet is a custom object I suppose, with a lookup or master detail field to the contact. Am I correct ?
  • If so, the simplest way to get over this would be:
    • Create a "last login" date field on the contact (and not a formula field). let that field sync to Marketo
    • Create a salesforce workflow on the user custom object, that each time the login date is updated, the contact.login date becomes max (user.logindate, contact.logindate)
    • Initialize your contact login date with a dataloader on the users to force the updates

You will then be able to query the contact.logindate and will have much more flexibility. In case you need to retrieve the related user objet in a velocity script, you will be able to find the right one comparing the user.logindate with the contact.logindate

-Greg