Field Mapping issue
-
Hello ,
I’ve 2 problems with the plugin :first one : when i tried to push wordpress “users” object to salesforce “accounts” object ,it works and create the account on sales force but all the billing info is not pushed to sales force even it’s saved to wp_usermeta ??
second one : when i try to push wordpress “users” object to salesforce “contact” object ,
contact isn’t pushed to salesforce until i go to the user profile and push this contact manually ??and where can i access the log file , BTW i activated the log in the plugin ?
Thank you in advance ,
Kind regards .-
This topic was modified 7 years, 3 months ago by
Shwky.
-
This topic was modified 7 years, 3 months ago by
-
Hi @shwky
Based on my limited experience here, the following things would help diagnose your issue.
1. *Check your DB Table (mysql or equivalent) – Log into your PHPmyadmin and see if the following tables
* object_sync_sf_object_map
* object_sync_sf_field_maphave been created (screenshot below for your convenience)
2. Is it WP-cron? – Download this plugin (Wp Crontrol)
Then
1. Go to the scheduling tab and re-save the settings >> https://i.imgur.com/rZCUh2t.png
2. Check {{yourdomain}}/wp-admin/tools.php?page=action-scheduler and {{yourdomain}}/wp-admin/tools.php?page=crontrol_admin_manage_page to see if there are any cron events scheduled for the object-sync-for-salesforce plugin.
3. Check (Process asynchronously) under the ‘Field Maps’ tab on the Object Sync For Salesforce plugin – https://i.imgur.com/8ySgM3p.png
*Regarding your LOG – Turn on Debug mode and see if the plugin creates logs for API events with SF – https://i.imgur.com/HREZkDi.png **Note, my log isn’t functioning as intended either, but I was able to find events in my RAW ACCESS LOG on my server that ‘seem’ to correspond to the plugin (it’s hard for me to tell)
Hello @jaysitcc
thank you first ,
yes the tables has been created successfully .
I’m not using cron job here at all ,
What I’m talking about is the fields isn’t pushed automatically to sales force on wordpress create user .it works perfectly automatic when the salesforce object is “accounts” ,
but when the salesforce object is “contact” i must push the object manually from user profile on wordpress.I see. Hopefully one of the developers see’s this because what I’m about to say COULD be incorrect…I’ve never tried to use the plugin this way, and I actually have some support requests in as well at the moment…so this is just a theory/my two cents.
This plugin by default maps ONE object in SF to ONE (post-type, tax, etc.) in WP. The ‘Contact’ record you are trying to create from the User panel requires a related ‘Account’ in order for SF to create the ‘Contact’ record.
*If the ‘Account’ record is already created in SF, and your fields are already mapped, SF can create the ‘Contact’ and related it to the ‘Account’.
https://i.imgur.com/vt9tOOC.png is a screenshot showing that the Account Relation is required in SF.
—–
There are posts on this forum about Related Object Requirement Mapping using developer hooks
OK.
I thought about this a bit more…If you’re more handy on the SF end of things and want to steer clear of using dev hooks…you may be able to workaround it. (this is assuming you want to keep the relationship between Contact and Account)
1. create a custom object (let’s call it Contact2)
2. map your current ‘Contact’ object over to it via the dataloader. (if you don’t have many custom fields in ‘Contact’ that you need to map, don’t worry about this step)
3. Remove the required default dependency on the related account on ‘Contact2’ (but keep the field relationship)
4. Add a child relationship on ‘Accounts’ for ‘Contact2’
5. Create TWO workflows with the Object Sync for Salesforce.
1. Create the ‘Contact2’ record.
– Map an ACF_meta field with the ‘Contact2’ ID
– Have the record update via a flow/process in Salesforce -> Object Sync for Salesforce Updates the ACF_meta field with the ‘Contact2’ ID
2. Create the ‘Account’ Record via separate field mapping on User WP
– Have the ‘Contact2’ ID mapped to the Account relationshipDisclosure- I have NOT attempted this personally, and I cannot guaranty it will work. I’ll cross my fingers for you if you wish to attempt it. =)
-
This reply was modified 7 years, 3 months ago by
jaysitcc.
Thanks again @jaysitcc
I figured out what is the problem but i cannot find a solution for it :
– the problem is all the fields of wp_usermeta (like : first_name ) cannot pushed to SF object (contact or account) automatically on create , only the wp_users table data (like : user_login ) can be pushed directly automatic after registering user.
– if i want to pass any wp_usermeta data to SF i must push it manually through the user profile again and it overwrite the empty old data .
i think this problem is because of hooks order as
1 -the plugin call its hooks to push data while wp create user.
2 -and this done (step 1) before saving the user meta to db .
3 – so the plugin hook called before the meta of the user been created so it send an empty values .
– so i think the problem is here .
But for sorry i cannot find a solution .Thank you again for your help and your time .
@shwky this is certainly true, and is an unfortunate limitation of how WordPress creates users.
One thing that was added to this plugin in 1.7.0 is that it checks to see if Salesforce requires a field before creating an object. If it does, the plugin basically tries to stall sending data to Salesforce until it can get a result for that required field.
So in other words, if you create those fields in Salesforce and mark them as required, the plugin can try to wait for that data before trying to make a Salesforce request.
@jonathanstegall
I’ve also tried this solution and for sorry it doesn’t work because if you pass an empty field value from WP to SF required field , the process of pushing the object will exit .@shwky the plugin should pause before passing meta values if the Salesforce field is required, but if it does not and they are still empty, there’s probably nothing else that can be done.
-
This reply was modified 7 years, 3 months ago by
The topic ‘Field Mapping issue’ is closed to new replies.