Issues prematching on custom field (post_meta)
-
I want to make sure I’m approaching this correctly:
- We are only pulling from Salesforce to WP; we are not pushing
- We have a custom post type (doctor)
- We have a custom field on that post type to store the Salesforce Account ID
- We have existing content that mirrors the Salesforce content but has been entered manually in the past; this project is intended to switch to managing the data in Salesforce and syncing it down to WordPress.
We have two fieldmaps:
- One is triggered when the Salesforce account is modified and is supposed to prematch the WP custom field with the Salesforce Account ID.
- The other is triggered when an object on that account in Salesforce containing hospital assignments is modified or created, and is supposed to prematch the WP custom field with the object’s “Account__c” field which should be the same as the main Salesforce Account ID to which the object is attached.
In both cases, the prematching does not seem to take place and a new post is created in WordPress instead.
We have tried using
object_sync_for_salesforce_find_wp_object_matchandobject_sync_for_salesforce_pull_mapping_objectto no avail.If we instead use the
post_titlefield to store the Salesforce Account ID in WordPress and we prematch on that, the object mapping is created correctly and uses the post ID of the existing matching WordPress post.Is this an issue with the fact that it’s trying to prematch on a meta field instead of a core post field?
We would prefer to keep the name as the post title, and to not match on the name because of chances of errors or incorrect mapping if there’s more than one John Smith, for example.
The topic ‘Issues prematching on custom field (post_meta)’ is closed to new replies.