Instead of hook_form_altering the Salesforce settings form, it could make the UI more consistent if the fieldmap selection for orders (and accounts) was directly attached to the action - then you would configure all the Salesforce automatic exports with CA.

This would also let you use different fieldmaps for different scenarios, by having multiple predicates with conditions and actions attached.

Comments

EvanDonovan’s picture

This would be a great improvement, I agree. Patches welcome? :)

EvanDonovan’s picture

I am going to leave this until after the next alpha, in any case. If you could write up a patch, that would be great. I am not an expert at conditional actions integration. I could do it though, if necessary.

Does this mean that the actions themselves would need to be more granular?

EvanDonovan’s picture

Actually, I may be able to take this on soon. I presume the relevant bits are the #argument_map in the #actions array for a hook_ca_predicate() implementation, and then the #arguments array in the hook_ca_action() implementation, the latter of which will get passed on to the conditional action callback, where they could be used by the call to the export function itself.

I believe that this would require having the uc_sf_order_export() function receive an array of fieldmap names, though, so that it they could be specified on a Conditional Action level. Does that seem right to you?