• Resolved katjavolker

    (@katjavolker)


    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

    (@jonathanstegall)

    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

    (@katjavolker)

    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

    (@jonathanstegall)

    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

    (@katjavolker)

    Indeed, thank you for your time ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sync priority’ is closed to new replies.