Title: Sync priority
Last modified: September 20, 2022

---

# Sync priority

 *  Resolved [katjavolker](https://wordpress.org/support/users/katjavolker/)
 * (@katjavolker)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/sync-priority-2/)
 * Hey Jonathan.
    I have tried to find an extending function to check if an object
   with certain fields could be pulled first while the others are “on hold” if the
   fields do not match.
 * Would that be possible with object_sync_for_salesforce_pre_pull?
    If so, could
   you point me in the right direction on how to accomplish this?
 * So, ideally: If the two object fields match go ahead and sync now, if not put
   the object on hold and sync when all matched objects are synced.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/sync-priority-2/#post-16027264)
 * I’m not really sure how you would do that because the way Action Scheduler works
   is that it doesn’t process records until it adds them to the queue, but if it
   skips a record (because it’s not allowed, for example) it just doesn’t add it
   to the queue and it won’t be seen by the plugin again until it’s updated again.
 * I think if I’m understanding you correctly you might have to rewrite a lot of
   the code, basically so that it always adds records to the queue, but that when
   it runs the queue it might not sync a record, but also would keep it in the queue.
   While that is definitely beyond what the plugin would do with basic hooks, I’m
   not sure if you might have other ways of doing it.
 *  Thread Starter [katjavolker](https://wordpress.org/support/users/katjavolker/)
 * (@katjavolker)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/sync-priority-2/#post-16027278)
 * Thanks for getting back and the clarification. That was exactly what I was thinking.
 * OK, so what if I would rewrite the is_pull_allowed, check for the posts to be
   synced first and then somehow trigger a new is pull allowed and fetch the rest?
 * Would that be an option or will this add to the data load there already is?
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/sync-priority-2/#post-16027343)
 * Well, if you run a new pull, by default the plugin would change the timestamp
   that it’s using, so it would likely load a different set of records. I think 
   you probably would indeed want to use is_pull_allowed (there’s a hook for that,`
   object_sync_for_salesforce_pull_object_allowed`), but I think the tricky part
   is what you do after that.
 *  Thread Starter [katjavolker](https://wordpress.org/support/users/katjavolker/)
 * (@katjavolker)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/sync-priority-2/#post-16027353)
 * Indeed, thank you for your time 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Sync priority’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [katjavolker](https://wordpress.org/support/users/katjavolker/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/sync-priority-2/#post-16027353)
 * Status: resolved