WP Salesforce Membership Integration
This page is the published configuration reference for the WP Salesforce Membership Integration WordPress plugin. The plugin sends WP membership, profile, corporate sub-account, course, and event activity from WordPress to Salesforce.
Setup checklist
- Define
WP_SF_API_KEY_SANDBOXandWP_SF_API_KEY_PRODUCTIONinwp-config.phpwhere possible, or save masked per-environment keys on the plugin settings screen. - Choose the Salesforce environment: Sandbox for testing or Production for live traffic.
- Confirm every endpoint path in the Endpoint Manager; URL resolution uses override first, then environment base URL plus path.
- Enable only the integrations that have completed sandbox QA for the WP site.
- Use the endpoint test harness and Associations preview tool to verify authentication, payload shape, product mapping, and response parsing.
- Review the API Log after each test and resolve any prerequisite-data statuses before production sign-off.
Endpoint configuration reference
| Endpoint key | Settings option | Purpose | Typical trigger |
|---|---|---|---|
create_membership |
wp_sf_endpoint_create_membership |
Creates or updates the paid membership opportunity. | MemberPress transaction completed or WooCommerce membership order completed. |
non_member_participants |
wp_sf_endpoint_non_member |
Creates a Salesforce Contact for non-member participants. | Manual wp_sf_non_member_participant action, WordPress registration, WooCommerce completed non-membership order, Gravity Forms submission, or contact chaining from Course/Event integrations. |
update_member |
wp_sf_endpoint_update_member |
Syncs member profile changes to Salesforce (Update Member API v2.0: updates an existing Contact or creates one when no match is found). | WordPress profile save, BuddyPress xprofile save, or WooCommerce address save. |
sub_account |
wp_sf_endpoint_sub_account |
Creates or links corporate sub-account members via the Create Sub-Account API v1.0 (path create-sub-account), including the child Asset cloned from the purchaser’s membership Asset. |
MemberPress Corporate Accounts create or assign events. Removal events are logged locally; the API has no removal operation. |
create_course_attendee |
wp_sf_endpoint_create_course_attendee |
Syncs WooCommerce course purchases to the Salesforce Course Attendee API. | Completed order/payment containing mapped course products. |
event |
wp_sf_endpoint_event |
Syncs The Events Calendar/Event Tickets registrations. | Attendee creation/update or attendee cancellation. |
Association engine and product mapping
Use SF Membership → Field Associations to map every endpoint field to registered website sources with fallbacks, transforms, required-field flags, import/export, and preview payloads. Use SF Membership → Product Catalog to map website products to sandbox and production Salesforce Product2.Id values.
The Non-Member Participant trigger can be limited to one Gravity Forms form ID on the Settings screen. WooCommerce non-member order syncs skip orders that grant WooCommerce Memberships so those orders remain in the Create Membership flow.
Admin tools and Salesforce contract settings
Use SF Membership → Admin Tools to adjust required fields, success HTTP codes, response message paths, Salesforce ID paths, membership-type policy, and production contract confirmations after Salesforce confirms the final contracts. Endpoint REST paths are managed in the Endpoint Manager. Production confirmations require a Salesforce confirmation reference and record the confirming administrator and timestamp.
Config bundles and presets
Use SF Membership → Config Bundles to export the full plugin configuration as JSON (wp-sf-config/1 format), import a bundle from another site, or apply an implementation-specific preset. Bundles cover general settings, endpoint configuration, endpoint contracts and policies, field association sets, the product catalog map, and course mappings. API keys and production contract confirmations are never included in bundles; keys are entered per site and confirmations are made per site in Admin Tools.
Logging and troubleshooting
Use SF Membership → API Log to filter by endpoint or status, inspect payloads and Salesforce messages, and retry failed calls. Operational statuses such as parent_not_linked, contact_required, and contact_create_failed identify records that need prerequisite Salesforce IDs or Contact creation before retrying.
FAQ
Why did a Course or Event sync create a Non-Member Participant first?
Course and Event payloads require a Salesforce Contact ID. When allowed by policy, the plugin creates a Contact through the Non-Member Participant endpoint before sending the Course or Event payload.
Why did a Sub-Account sync log parent_not_linked?
The parent corporate member does not yet have a stored Salesforce Opportunity ID. Link or reconcile the parent first, then retry the sub-account log entry or run the reconciliation tool.
Why did a sub-account removal log removal_logged instead of calling Salesforce?
The Create Sub-Account API v1.0 only creates or links members; it has no removal operation. Removals are recorded in the API Log for auditing and must be handled in Salesforce directly. A policy in Admin Tools can re-enable outbound removal calls if Salesforce later ships that capability.
Why did an Update Member call return HTTP 201?
Update Member API v2.0 auto-creates a new Contact (and, when companyName is supplied, an Account) when no existing match is found and lastName is present. The plugin stores the returned Contact and Account IDs on the WordPress user. A 404 means no match was found and lastName was missing.
Why did an Update Member call fail with “Unexpected error: Invalid id:”?
The update-member Apex (endpoint revision 3) also updates the membership Opportunity, so it needs the member’s stored Salesforce IDs. From v1.3.8 the plugin sends accountId and opportunityId from stored user meta or the opportunities table when the member is linked, and defers update_member for corporate sub-accounts (status sub_account_pending) until the Create Sub-Account call has linked them. If the error persists, confirm the member has a Contact ID and an Opportunity on their WordPress profile, and check the Field Associations screen for a static value that is not a real Salesforce ID.
Why are blank profile fields not clearing values in Salesforce?
Update Member API v2.0 performs partial updates: omitted, null, or empty-string fields leave the Salesforce value unchanged. Clearing a field requires a Salesforce-side code change; contact the Salesforce team if that is a requirement.
Should Production be enabled before Salesforce confirms the final Course/Event/Sub-Account contracts?
No. Those contracts were placeholder assumptions in the v1.1 PRD and must be confirmed in sandbox before production traffic is enabled.
