18 Replies Latest reply on Mar 13, 2018 2:42 AM by Michael Collins

    Multiple Salesforce Custom Object records causing confusion!

    Michael Collins

      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! :-)

        • Re: Multiple Salesforce Custom Object records causing confusion!
          Jep Castelein

          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.

            • Re: Multiple Salesforce Custom Object records causing confusion!
              Michael Collins

              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...

                • Re: Multiple Salesforce Custom Object records causing confusion!
                  Sanford Whiteman

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

                    • Re: Multiple Salesforce Custom Object records causing confusion!
                      Michael Collins

                      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!
                          Grégoire Michel

                          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

                            • Re: Multiple Salesforce Custom Object records causing confusion!
                              Michael Collins

                              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!
                                  Grégoire Michel

                                  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

                                  • Re: Multiple Salesforce Custom Object records causing confusion!
                                    Grégoire Michel

                                    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

                                      • Re: Multiple Salesforce Custom Object records causing confusion!
                                        Michael Collins

                                        Ha - I appreciate the help, I really do - but it won't work - we have at least 5 other use cases using date fields on these custom objects that have been worked out by our Customer Success team - I just need to figure out a way in Marketo to execute them.

                                        Also, adding fields from custom objects to the main objects is also kinda like saying that the Marketo Custom Object features don't work very well...imho

                                         

                                        :-)

                                          • Re: Multiple Salesforce Custom Object records causing confusion!
                                            Grégoire Michel

                                            Hi Michael,

                                             

                                            adding fields from custom objects to the main objects is also kinda like saying that the Marketo Custom Object features don't work very well

                                             

                                            I agree with you but at some point, it's about making it work

                                             

                                            but it won't work - we have at least 5 other use cases using date fields on these custom objects

                                            The solution above is having a field on the Main contact object, not the custom object.

                                             

                                            Has the CSM been able to make the other use cas work? Any learning on these about what works and what does not ?

                                             

                                            -Greg

                                              • Re: Multiple Salesforce Custom Object records causing confusion!
                                                Michael Collins

                                                Hi again,

                                                the CSM is only working with the data in Salesforce at the moment, making sure they are getting the Contacts that they think they want to communicate with based on the data within the User Custom Object - they then ask me to make it work from the Marketo side of things...

                                                I understand the points made about putting mapped fields onto the Contact object itself based on data coming from the User record - but we have different use cases using different date fields etc, so my last resort will be to go back and ask them to map all of these fields onto the Contact record.

                                                My main query here really is this: -

                                                if I can pull 17 Contact records in a Salesforce report who last logged in on the 8th March 2017 - using a custom report type where Contacts are associated to the User object

                                                AND

                                                if I can pull those same 17 Persons in a Marketo smart list using the 'has User' filter with the constraint of last logged in date being the 8th March 2017

                                                then WHY does the same logic not work with last log in date being in past before 365 days and in past 366 days - which equates to the 8th March 2017...doesn't this all point to the fact that the filters don't work as expected on Custom Objects? I'm pretty sure I get all 17 of the original people included here, but for some reason I also get a whole bunch of others who don't meet the criteria as far as I can tell...

                              • Re: Multiple Salesforce Custom Object records causing confusion!
                                Josh Hill

                                This is definitely a concern with Marketo.

                                 

                                For SFDCCustom Objects, I'd suggest going through the setup carefully because the data should be there.

                                 

                                One way we handle targeting specific Opps and Contacts is to export the SFDC IDs and re-match them with a filter or hope that the email addresses at least match roughly the right records. Unfortunately, the only real matching tool would be to use middleware like talend to match SFDC IDs properly and Add to List.

                                • Re: Multiple Salesforce Custom Object records causing confusion!
                                  Grégoire Michel

                                  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

                                  1 of 1 people found this helpful