Title: User Role mapping
Last modified: February 10, 2021

---

# User Role mapping

 *  Resolved [esowers](https://wordpress.org/support/users/esowers/)
 * (@esowers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/)
 * We’d love to map user roles to Salesforce. I’m able to push data from WP to SF
   However whenever its mapped and there is a change in salesforce it comes back
   to WordPress’s database as an unserialized value (when WordPress normally stores
   that info as a serialized array). Is there a way to map these successfully, or
   could that option be added to a roadmap?
 * Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/#post-14031684)
 * Currently the plugin does check to see if it’s trying to save data into the `
   wp_capabilities` field, and if it is, it tries to make an array that WordPress
   will then serialize.
 * Are you indicating that this doesn’t work in your situation, or that you need
   it to do something in addition to this?
 *  Thread Starter [esowers](https://wordpress.org/support/users/esowers/)
 * (@esowers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/#post-14031713)
 * Hmm, that doesn’t seem to be working correctly for me then. I’m syncing to a 
   TEXT field in Salesforce. I then remove a permission value (along with the preceding
   semicolon) and then I go to the user’s record in WordPress and do a manual “pull
   from Salesforce”. The value that gets pulled back to the wp database is the text
   value.
 * Does my Salesforce field need to be a picklist(multiselect) instead?
 * I am trying to map to the wp_capabilities field.
    -  This reply was modified 5 years, 3 months ago by [esowers](https://wordpress.org/support/users/esowers/).
 *  Thread Starter [esowers](https://wordpress.org/support/users/esowers/)
 * (@esowers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/#post-14031740)
 * Oh, I just realized. I am using [User Role Editor](https://wordpress.org/plugins/user-role-editor/)
   plugin to manage permissions and assign multiple user roles. Could that be the
   issue?
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/#post-14031766)
 * I think it does need to be a picklist in Salesforce, yes. The plugin does check
   for that first. It makes the assumption that roles would go to a picklist. Then
   I think it will work with the User Role Editor.
 * You could also use a developer hook to make it work with a non picklist field.
 *  Thread Starter [esowers](https://wordpress.org/support/users/esowers/)
 * (@esowers)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/#post-14031908)
 * Awesome! Got it working. I think the plugin was caching the field type of TEXT
   from salesforce so when I changed the field type it wasn’t pulling over the correct
   values. I deleted the mapping and re-mapped it and now it’s serializing the values
   correctly from the multi-select list in Salesforce.
 * Thanks for your help!
 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/#post-14031921)
 * Great! I’m not necessarily opposed to letting it map roles to non-picklist fields,
   but it feels like it would require a lot of thought to make sure it doesn’t mess
   up other things. For now I think we’ll keep it as it is, although it does flag
   [some documentation needs](https://github.com/MinnPost/object-sync-for-salesforce/issues/376)
   I don’t think I’ve articulated before.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘User Role mapping’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/user-role-mapping/#post-14031921)
 * Status: resolved