Support » Plugin: Object Sync for Salesforce » Bring in old SF data

  • Resolved me8him



    Firstly, we really like your plugin and think you’ve done a great job.

    Reading the documentation I see that you can only ‘pull’ new data from Salesforce (i.e. data that was added after the installation date of the plugin on WP).

    Now if we wanted to bring in old data, is there a way can do this? Is it a case of changing the installation date of the plugin? or adding SF references in the DB? (I tried the later but it didn’t use the correct fieldmap)

    Any guidance on how to go about this would be greatly appreciated.

    Thank you in advance.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Jonathan Stegall


    @me8him I am not sure this would be possible at all, but here’s something you could try. In the wp_options table, we store a value called “object_sync_for_salesforce_pull_last_sync_Contact” (for example, but we store it for every Salesforce object type that the plugin pulls). The value is a unix timestamp.

    The way the plugin uses it is that when it runs a pull queue, it looks for data that has been modified or created or whichever date field you choose when you are mapping the Salesforce object, and it uses the value of the above field.

    I think it’s possible that you could change that value to a previous date and get older data.

    This is certainly untested, so you might want to try it in a sandbox first.

    Also, one issue that may prevent you from doing this (assuming it would work otherwise) is that currently the plugin has a limit of 2000 records that it can pull (the Salesforce API limits the LIMIT parameter on SOQL queries for reasons that are unclear) for a single timeframe (so a single SOQL query with pagination via LIMIT values, basically). I’d like to be able to get around this limit, but so far I don’t have a way to do that without putting the server at a risk of crashing.

    • This reply was modified 3 years, 6 months ago by Jonathan Stegall. Reason: clarify what the 2000 record limit means
    Thread Starter me8him


    Hi @jonathanstegall
    Thank you for getting back to me so promptly. I will give that a try on Sandbox.

    Regarding the limit, I guess that this would only limit the initial ‘sync’ with WP. There after it would be very unlikely that >2000 records be updated in one go. So presumably then we can tweak that timestamp a few times to limit each pull amount until we have brought in everything…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bring in old SF data’ is closed to new replies.