How to know when a record has successfully synced to Salesforce
SOLVE
Does anyone have a best practice for how to know when a record has synced to salesforce?
My problem is we use salesforce campaigns for attribution but if the record hasn't synced initially the workflow throws an error saying "I can't add to the salesforce campaigns because there's no corresponding salesforce record."
I've tried a variety of different wait steps but that's a race condition and depends on the sync happening within a time threshold. That has proven to be unreliable.
When I do these types of delays, I usually add a branch that if the value is still unknown after a reasonable delay (I think 24 hours would be more than enough for your use case), to send an internal notification to you so that you can manually update/review if the contact hasn't synced.
Casey Hawkins HubSpot Freelancer | Digital Marketing Consultant
How to know when a record has successfully synced to Salesforce
SOLVE
Hi Casey,
Thanks for sharing your solution! I have one caveat to add which applies for situations where a Contact already has a value in the "Last Salesforce sync time" field.
The "Delay Until Event Occurrence" action is actually checking two factors: the obvious one is just whether or not there's a value set for Last Sync Time by the time the delay period ends, but the other piece that it checks is that the Last Sync Time field was updated during that delay period. So basically, if the Contact reaches that Delay action and Last Sync Time is already known, it would wait out the full delay period and the be routed down the failure track.
To avoid any issues with that, you'll just want to add an additional logic branch before the Delay Until Event Occurrence action that essentially says "If Last Sync Time is Known, use the Go To Action to skip to the Criteria Met branch of the Delay".
When I do these types of delays, I usually add a branch that if the value is still unknown after a reasonable delay (I think 24 hours would be more than enough for your use case), to send an internal notification to you so that you can manually update/review if the contact hasn't synced.
Casey Hawkins HubSpot Freelancer | Digital Marketing Consultant
How to know when a record has successfully synced to Salesforce
SOLVE
Hi Casey,
Thanks for sharing your solution! I have one caveat to add which applies for situations where a Contact already has a value in the "Last Salesforce sync time" field.
The "Delay Until Event Occurrence" action is actually checking two factors: the obvious one is just whether or not there's a value set for Last Sync Time by the time the delay period ends, but the other piece that it checks is that the Last Sync Time field was updated during that delay period. So basically, if the Contact reaches that Delay action and Last Sync Time is already known, it would wait out the full delay period and the be routed down the failure track.
To avoid any issues with that, you'll just want to add an additional logic branch before the Delay Until Event Occurrence action that essentially says "If Last Sync Time is Known, use the Go To Action to skip to the Criteria Met branch of the Delay".