MinnPost / object-sync-for-salesforce

WordPress plugin that maps and syncs data between Salesforce objects and WordPress objects.
https://wordpress.org/plugins/object-sync-for-salesforce/
GNU General Public License v2.0
96 stars 52 forks source link

Default Values - Ability to set default values in the event that the field mapping data is NULL #388

Open TornMarketing opened 3 years ago

TornMarketing commented 3 years ago

Is your feature request related to a problem? Please describe. We would love to see a means of having either a placeholder for default values without a WP/SF field, thus allowing for automation triggers to be fired in SF/WP when it meets XYZ criteria. We also have alot of mandatory SF fields that may not be on the relevant WP CPT, or where fields are required for specific circumstances for additional 3rd party apps.

Secondly, love a fall back default value when a mapped field is NULL

Currently we have been creating additional default fields on all CPT such as yes/no or 1/0 etc to handle a field mapping. Alot of redundant data

Describe the solution you'd like Additional column on the field mapping that would allow a SF default value and WP Default value

Describe alternatives you've considered Currently duplicating these default fields in WP on each CPT, but this is redundant and adds weight to the db.

Additional context

jonathanstegall commented 3 years ago

This is similar to #319, although I realize this would be many more fields than just the status field. I had planned to merge the status chooser into a larger interface project, although I'm not sure when that will be done.

But regardless, you can use a developer hook to do this in the meantime. You can use a developer hook to do this in the meantime, although it does require you to write an add-on plugin or put code into your theme.