Section 01
The ruling, stated plainly
“You are the connection between BuddyPress and affiliate wp.”
— Operator, 4 December 2026
That sentence is the whole instruction. Read carefully, it names three roles, and each role carries its own authority. Nothing in this document may blur them.
- BuddyPress is authoritative for member identity and for the per-member state transition. It is the operation’s record of who a member is, when they became a member, and which state they are in.
- AffiliateWP Pro is authoritative for referral attribution: who referred whom, for which program, and when. It is the operation’s record of the referral fact itself.
- The connection layer, operated by the ORB agent, is authoritative for the mapping between the two, for the reconciliation of their events, for the audit row that records what was matched and on what basis, and for the handoff of a confirmed attribution into the native credit ledger.
The separation this creates
Attribution and reward are separate concerns and stay separate. AffiliateWP supplies attribution; the native ORB credit ledger issues any credits, and nothing in AffiliateWP’s own balance or tier system has any standing in ORB. This is already how the ORB Rewards and Recognition Spec reads, so no change is needed there.
What this ruling does not change
It does not reopen the mandate refusals. There is no referral-count tier, because a tier earned by recruits is recruitment pressure dressed as recognition. There is no public ranking, no behavioural nudging, and no sharing of participation data without specific, revocable consent.
Section 02
What each side is authoritative for
Read this table before writing a single line of code. If a field appears in the wrong column, it is being held by the wrong system, and the fix is to stop holding it rather than to copy it.
| Side | Authoritative for | Explicitly not authoritative for |
|---|---|---|
| BuddyPress | Member identity, the per-member state transition, the membership start date that the per-member roster already holds, and the member’s own opt-in consents | Referral attribution, credit issuance, any ranking, and any member-facing standing |
| AffiliateWP Pro | Referral attribution, the per-program referral record, the referral capture and the per-program bookkeeping | Member identity, member state, credit issuance, and any standing a member holds in ORB |
| The connection layer | The mapping between a referral and a member, the audit row, the event reconciliation, and the handoff into the native ledger | Any credit amount, any tier, any member-facing ranking, and any member personal field that neither side needs |
Scroll sideways to see all columns →
Neither side holds the other’s data for ranking purposes. BuddyPress does not learn who referred whom in order to rank a member, and AffiliateWP does not learn a member’s standing. The connection layer holds the mapping and keeps it inside the operation’s own audit trail.
Section 03
The identity mapping, and why it is the hard part
This is where the two systems meet, and it is the part most likely to produce bad data if it is left loose. Six rules govern it.
- A referral is captured against a token and may be claimed later, or never. A member is created in BuddyPress and may carry no referral at all. Both sides are incomplete on their own.
- One referral record resolves to at most one member. One member may carry at most one credited referral per program window. A member may carry none. The mapping is one-to-many safe in both directions.
- No silent enrolment. A member is never enrolled in the referral programme by an automated path. A member is asked, and the answer is recorded. This is carried from the Rewards Specification’s referral-recognition verdict and is not relaxed here.
- Self-referral is refused, matching the operation’s existing anti-self-dealing rule, and the refusal is logged rather than silently dropped.
- An unresolved referral stays unresolved. The connection never guesses a member, never creates a member identity from a referral, and never re-points a referral to a different member to make a count work. A referral that cannot be matched is a finding for an operator, not a defect to paper over.
- A referral that resolves to a member already credited for another referral in the same window is flagged for operator review rather than silently credited.
The agreed identifier is the referral tag, and it is held as a join pointer on the member. The member’s orb_affwp_tag user meta key on orb-commons.com holds the tag and holds nothing else, so the two sites are joined on the tag and never on a user id. This matters because orb-commons.com and orb-business are separate WordPress installs with separate user tables, so a member’s local WordPress user id is not the affiliate id and must never be sent as one. The join pointer is written by the operator or by the connection layer’s audited enrolment step, and the template reads it as read-only. A match made on it is recorded with match_basis set to verified match on an agreed identifier.
Section 04
The audit row shape
Every resolution this connection performs produces exactly one row of this shape. It is the operation’s own record of what was matched, on what basis, and whether anything was issued as a result.
| Field | Meaning |
|---|---|
referral_ref |
AffiliateWP’s own referral identifier, the attribution authority’s key, never invented locally |
member_ref |
The BuddyPress member identifier, or null while the referral is unresolved |
program |
The per-program record the referral belongs to, being Orb-Business, Orb-Commons or Cosmic Consulting |
captured_at |
The timestamp at which AffiliateWP recorded the referral |
resolved_at |
When the member was matched, or null |
match_basis |
How the match was established, being claim at signup, verified match on an agreed identifier, or operator-confirmed, so a human can audit the basis and not just the outcome |
state |
One of captured, resolved, unmatched, declined or retired |
authorising_role |
The role that granted the match |
reason |
A plain-language sentence an operator or member can read |
ledger_event_ref |
The native ledger event that issued any credit, or null when no credit was issued |
Scroll sideways to see all columns →
The row is append-only and the history stays reconstructible, matching the credit ledger’s discipline. The row carries identifiers and states only. It carries no date of birth, no age, no member personal field that neither side needs, and no ranking.
Section 05
The first end-to-end test
This one is first because AffiliateWP owns attribution, so resolving a referral that already exists creates less risk than creating referral facts that may never have existed. The reverse direction could mint facts. The test below therefore runs in one direction only, and every pass condition is written so a reviewer can check it without reading the code.
| Step | Pass condition |
|---|---|
| Referral recorded | AffiliateWP holds a referral record for the program with a captured timestamp and no member attached |
| Member created | BuddyPress holds a member whose signup carried that referral token |
| Resolution | The connection writes exactly one audit row carrying the referral reference and the member reference, with state resolved and match_basis recorded |
| Idempotence | Running the resolution again on the same referral produces no second row and no second credit |
| No duplicate credit | The member’s ledger shows at most one credit for that referral |
| Negative case | A referral with no matching member stays unresolved with a null member reference, and no member is created |
| Wrong-member guard | A referral whose token resolves to a member already credited for another referral in the same window is flagged for operator review, and is not silently re-pointed |
| Self-referral | A referral whose referrer and joiner resolve to the same member is refused, and the refusal is logged |
| Privacy | The audit row carries no date of birth, no age and no ranking, and nothing is exported to a third party |
| No silent enrolment | A member who never supplied a referral token is never enrolled by any automated path |
Scroll sideways to see all columns →
A pass is the presence of the condition, not the absence of an error message. The negative case, the wrong-member guard, the self-referral refusal and the no-silent-enrolment case are the ones that matter most, because they are the ones a careless implementation passes by omission.
Section 06
The constraints that bind this seam
These are not preferences. They are the boundaries the connection is built inside, and each one exists because it protects a member.
- Participation data. A referral record is participation data. It is never exported, never sold, and never used to target a member with anything.
- One-way personal data. Member personal fields never reach the referral record, and the member’s date never reaches AffiliateWP.
- No referral-count tier. Contribution and service milestones are the only tier-like mechanism the operation will have.
- Opt-in, scoped, switchable ranking. Ranking, where any is offered, is opt-in, scoped to a community, and switchable off entirely.
- One home for the mapping. The connection layer is the only place the mapping lives, and it lives in the operation’s own audit trail.
- Corrections are new events. A prior row is never edited, so a mistaken match is reversed by a new reversing row rather than by erasure.
Section 07
The build state, and what is owed
Honest position, so nobody plans against a capability that does not exist yet.
| Item | Status and why it matters |
|---|---|
| AffiliateWP Pro access Pending |
PENDING on the ORB Tool Registry, while its operator record names it as installed in step three of the four-tool sync. Installed is not the same claim as operational, and the endpoints that would let the connection read referral records are not yet confirmed. This is the first hard dependency of the first test. |
| BuddyPress access Wired |
WIRED on the ORB Tool Registry as the member-identity plugin, and the record already places it in the audit trail with AffiliateWP. Whether the connection can read members programmatically is still owed. |
| The runtime home Decided |
Named by the record, and not an open question. The connection is a companion WordPress plugin, orb-affwp-client, installed on orb-commons.com, wrapping the AffiliateWP Pro REST API calls to orb-business. The two-site split is fixed: orb-business holds AffiliateWP Pro and the referral facts, and orb-commons.com holds BuddyPress and the member facts. The client code, the updated profile template and the wp-config additions are already drafted on the BuddyPress Profile Template page. What is missing is deployment, not design. Direct database control remains unconfirmed, but it is no longer the question that decides where this connection runs. |
| SalesNexus Pending |
PENDING, and named as the workflow owner for the per-state event log. The connection writes to the audit trail first, and the Sales Nexus sync named in section five of the ORB Bridge Spec carries the per-state event log entry, the per-state action and the per-tier reporting line update once it is live. |
| The first end-to-end test Not built |
Specified above, and not built. No referral has been resolved and no audit row exists. |
| Build state Nothing shipped |
Nothing on this page has shipped. |
Scroll sideways to see all columns →
Blocking dependency
AffiliateWP Pro access is still the gate on the whole seam, because the referral-read path is what the first test exercises. But the gate is deployment rather than design. The architecture, the client code and the field split are already drafted on the record; what is owed is an installed WordPress and BuddyPress on orb-commons.com, an installed companion plugin, a configured AffiliateWP Pro on orb-business, and a real API key in place of the placeholder.
What is owed, in order
Deploy the two sites. Install and configure the companion plugin and the profile template on orb-commons.com, and replace the placeholder API key and JWT secret in wp-config with real ones. Then confirm the referral-read path returns a referral for a known member. Then run the first end-to-end test and leave the first audit row behind.
Section 08
The cross-references
Nine documents carry the surrounding rules. Read the one that governs the question at hand before changing anything in this seam.
- The BuddyPress Profile Template (ORB), for the runtime home of this connection. It carries the companion plugin
orb-affwp-client, the updated profile template, the wp-config additions for orb-commons.com, and the local-versus-cross-site field split. Section 7 of it is the existing draft of this connection and governs how it is built. - The Referral Intake Master Template, for the referral capture surface. One submission routes to the member’s own account for project management and tracks through their AffiliateWP tag for attribution, and it is the surface the first end-to-end test reads.
- Payroll vs. AffiliateWP, the Boundary, for what an AffiliateWP payout may ever be. AffiliateWP is for commission-based sub-contractor payments and not employee payroll, and the separation between attribution and credit holds with it.
- The ORB Rewards and Recognition Spec v1.0, for the credit ledger, the referral-recognition event, the refusal of spending-based and referral-count tiers, the no-silent-enrolment rule and the anti-self-dealing rule.
- The ORB Bridge Spec v1.0, for the eight-state per-page state machine, the founder-member pattern and the per-referral surface, and section five of it for the Sales Nexus sync.
- Bridge Tool 8, Per-Referral Capture, for the five-state coupon lifecycle, the per-referred-client commission math and the provider compounding math.
- The ORB Tool Registry v1.0, for the BuddyPress, AffiliateWP Pro and SalesNexus rows.
- The ORB Tech To-Do, for the four-tool sync and the per-tool integration rows.
- The ORB Session Start Card, for the operating frame and the open questions.
Where this document and a sibling document appear to disagree on a point of authority, the ORB Rewards and Recognition Spec v1.0 governs recognition, the ORB Bridge Spec v1.0 governs the state machine, the BuddyPress Profile Template governs the runtime home and the field split, and this document governs only the connection between member identity and referral attribution. Anything outside that seam belongs to another spec.