Queue update requests before calling CRM API
I would love a *programattic* way – of “queuing” update requests to a single user account, then – issuing a commit to wpFusion for a single user ID, that tells wpFusion: *now* call the CRM API.
Use case: I catch a hook from an event, and need to: a) remove a tag, b) add a new tag, c) remove a roll, d) add a role.
Today, each action causes wpFusion to “call the CRM” with an update. What I’d like is transaction control:
1) wpFusion->startUserUpdate( );
2) remove role
3) add role
4) remove tag
5) add tag
6) wpFusion->CommitUpdate( );
I don’t really care how we “bundle update events” against a single user id, but I’d like to “queue” the actions, and only call the CRM one time once all the updates are finished.
Maybe this isn’t a good idea – because it “might screw up the processing in the CRM”… if that’s the case, then I’d suggest an alternative: please list a best practice document in your knowledge base – something that “suggests” the ordering of these actions….
My other issue (with this process) is: my CRM “calls back to wordpress” on a separate threaded operation, while I’m in the middle of my steps, and causes the contact record to get out of date. Yes, I’ve contacted my CRM – they shouldn’t be calling wpFusion as a result of an API update call.
I still think though, some form of optimization for bundling “contact record updates” might help.
Any help is welcome. Thank you!