• Resolved ilana Bittner

    (@ilanabit)


    I’d like to be able to sync Buddypress Profile fields to Salesforce. They appear on a User’s profile page under a second tab labeled Extended Profile, but those fields aren’t populating as User Objects in the plugin. Is there any way to pull those fields in?

    Thanks!
    ilana

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @ilanabit this would certainly be possible by using the developer hooks in this plugin. But because BuddyPress doesn’t use the wp_usermeta tables/methods for adding fields, which is the default WordPress method, this plugin isn’t aware of those extra fields.

    We have a bit of documentation about the relevant developer hook here in GitHub, but it might be a little complicated, depending on whether BuddyPress has an API, or how friendly it is to developers.

    In any case, we’re unlikely to support it “out of the box” on this plugin, simply because it isn’t a core method that WordPress has on its own.

    @jonathanstegall this is also a feature we’d like to see. BuddyPress is pretty widely used in the WordPress community. And a lot of our clients have use case scenarios that fit this exactly. If it’s not supported out of the box, what are our options for getting this setup?

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @andtheballrolls we have a developer hook designed to extend the available WordPress fields, but as I say above, how complicated it is depends on how API-friendly BuddyPress is.

    Here’s some documentation on that hook: https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/extending-mapping-options.md#available-wordpress-fields

    There are many other hooks in this plugin as well. I’m not sure that you would need more than just the one above, but we list all of the hooks and document them here: https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/all-developer-hooks.md

    We won’t be building BuddyPress support directly into this plugin, but would happily link to another plugin that achieves it for any users that use BuddyPress.

    Thread Starter ilana Bittner

    (@ilanabit)

    Thanks, Jonathan!

    The hooks look great, but this part of a big project got dumped on me at the last minute, using them is probabbly a little beyond my php capabilities in the time I have to do it. I punched the fields into regular usermeta instead using a plugin called User Extra Fields, your plugin sees them now and BuddyPress still displays them.

    I just want to take a sec to thank you for this work. It’s an immensely useful tool, and incredibly well-documented and supported. Even though I live in Maryland, I just subscribed to MinnPost to support your efforts and mission of great journalism.

    Warmly,
    Ilana

    Thread Starter ilana Bittner

    (@ilanabit)

    Sorry, @andthballrolls I didn’t see your question before I marked it as resolved. I used User Extra Fields to create the fields I needed. Both Object Sync and Buddypress recognize these fields. The only thing that’s a little squirrely is when you’re setting up Fieldmaps in the Object Sync settings, the new fields you create show up as a hard-to-deciffer string of characters, like wpuef_cid_c2. As long as you keep track, its not a problem.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @ilanabit thanks so much for your kind words, and support of MinnPost as well. I’m in awe!

    Also, thanks for the solution here. I’ve decided to create an issue for possible add-ons that could exist for this plugin, using the hooks and such to provide support for other WP plugins. https://github.com/MinnPost/object-sync-for-salesforce/issues/122

    It is not necessarily likely that we’d build an add-on here at MinnPost if we don’t use the plugin that would require it, but we would be happy to link to any add-ons from the GitHub repo, this plugin’s documentation, etc.

    @ilanabit – Thanks for the information. I’m back to work on this project. I installed User Extra Fields, setup my fields, see them on the profile. But, I don’t see them in the WordPress Field list. Selections:

    WordPress Object: user
    Salesforce Object: Contact
    Data field to trigger pull: Last Modified Date

    Is there a setting in User Extra Fields that i’m missing?

    Ryan

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @andtheballrolls while I haven’t used User Extra Fields, it is possible you need to clear the plugin cache for Object Sync for Salesforce. On the fieldmap list page, you should see a link to do this. I would try that first, although beyond that I don’t have much to offer.

    @jonathanstegall Thanks for that info. I did that, but it didn’t solve the problem unfortunately.

    Figured it out. The fields I created were all blank. As soon as I added data to a field for a user, it triggered the WordPress Field list to display all the fields.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    @andtheballrolls yes, that is unfortunately the case. Fields don’t have a presence in the database until they have a value. The standard WordPress meta fields work this way as well; they just sit around in code until they’re used, but there isn’t a method to retrieve a list of them from the code, but when used they get a presence in the database, and this plugin uses those values to see what fields there are.

    I think we could and should document this (we currently just have a GitHub issue about it), but of course documentation is not a fix; my own hope is that the Fields API will solve this if/when it arrives in WordPress Core.

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

The topic ‘Syncing Buddypress Profile Fields’ is closed to new replies.