Skip to content

Camino (Identity + CRM)

The identity hub of the RBS ecosystem. OAuth2 IdP, multi-tenant organization primitives, and the CRM event sink where every other app reports activity.

URL: camino.redbroomsoftware.comStatus: LIVE Tier: T1 SDK: @r-bsoftware/ecosystem-sdkRBSAuth, generateState, validateState, createSubscriptionClient, registerWithEcosystem, APP_REGISTRY

What you can integrate

  • Single sign-on for your app via Camino's OAuth2 + PKCE authorization server (21 registered clients today — one per ecosystem app)
  • Subscription + feature gating — check tier entitlements before serving paid features, surface upsell recommendations
  • Customer activity ingestion — emit activity.logged, customer.created, sale.completed, etc. and have them land on a unified CRM timeline for the end customer
  • Org-to-tenant resolution — map your internal tenant IDs to a canonical Camino organization
  • Embed a lead-capture widget via /embed/lead-form.js

Authentication

Two auth modes for partners:

  • User-facing: OAuth2 with PKCE. See Auth for the full authorize → token → userinfo flow.
  • Server-to-server: API key (Authorization: Bearer <key>). Issued per app from the Camino admin console.

Inbound webhooks from partner apps are signed HMAC-SHA256 — see Webhooks.

Endpoints

MethodPath
GET/api/analytics/conversion-funnel
POST/api/auth/reset-password
GET, POST/api/chatbot/query
POST/api/checkout/bundle/pricing
GET/api/checkout/bundle/products
POST/api/checkout/bundle/session
GET, POST/api/checkout/bundle/session/:id
GET/api/checkout/bundle/stats
PATCH/api/cobranza/:id
POST/api/communications/send

300 total — 173 admin/cron/internal (hidden) — +117 more primary endpoints not shown. Source: src/routes/api/**/+server.{ts,js} in the camino repo.

Events emitted

EventReceiversDescription
account.deletion_requestedcolectivaA user has submitted an account deletion request (soft-delete). Subscribers mark local user records with deletion_requested_at and notify their local operators — they do NOT auto-delete data. Actual anonymization is gated behind a separate 'account.deletion_approved' event (Phase 4).
brain.signalcamino, colectivaCross-brain intelligence signal. Emitted by Camino (marketing/fiscal intelligence) and Colectiva (operational/financial intelligence) to share insights bidirectionally. Carries a typed signal with severity, priority, and actionable context.
catalog.sync.completedcomalCamino → Comal callback when a TikTok catalog sync succeeds for a Comal store product. Comal updates products.tiktok_product_id + tiktok_synced_at.
catalog.sync.failedcomalCamino → Comal callback when a TikTok catalog sync fails. Comal surfaces the error to the merchant in the product list.
customer.createdcamino, constanza, garitaA new customer/contact/third-party record was created — used for CRM sync, fiscal pre-registration, and cross-app contact linking.
customer.mergedagente, cosmos-pet, hoja, madrigueraTwo duplicate customer records were merged in Camino — receiver apps update their local foreign keys to the canonical customer ID.
customer.updatedagente, colectiva, constanza, cosmos-pet, garita, hoja, madrigueraA customer/contact record was updated in Camino — receiver apps sync the changed fields to their local customer records for display and invoicing accuracy.
deal.billedconstanza[auto-derived] deal.billed event
deal.commission_readycolectivaCamino has processed a deal billing record and calculated commission splits. Colectiva uses this to route payouts to developer/provider wallets. S125 Gap #18.
deal.wonagoraA deal was marked as won in Camino CRM — Agora creates or updates the associated matter/client record for the legal team.
insights.availableagente, cosmos-pet, hojaCamino's AI engine generated new business insights for a tenant — receiver apps surface the insights in their dashboards for operator review.
lead.qualifiedagoraA lead was qualified in Camino CRM — Agora receives the qualified lead to create a new matter intake for the legal team.
subscription.activatedagente, agora, camino, caracol, colectiva, comal, constanza, continua, cosmos-pet, garita, hoja, madriguera, mancha, patadas, plenura, rito, servilletaA subscription plan has been activated for a tenant — all apps that gate features behind the subscription tier update their local tier state.
subscription.cancelledagente, agora, camino, caracol, colectiva, comal, constanza, continua, cosmos-pet, garita, hoja, madriguera, mancha, patadas, plenura, rito, servilletaA subscription has been cancelled — all apps that gate features behind the subscription tier update their local tier state to free/cancelled.
subscription.changedagora, caracol, comal, cosmos-pet, hoja, madriguera, plenura, ritoA subscription plan has been upgraded or downgraded — receiver apps update their tier gates and feature access accordingly.
subscription.expiredcomal, plenuraA subscription has expired (end of billing period, no renewal)
subscription.limit_approachingagente, cosmos-pet, hoja, madrigueraA tenant's subscription usage is approaching the plan limit — Camino notifies subscriber apps to surface a plan-upgrade prompt to the tenant operator.
subscription.past_duecomal, plenura, ritoA tenant's subscription entered past_due state after a failed renewal — Camino dunning flow pauses feature access without cancelling. Receiver apps mark memberships or subscriptions past_due until payment is received.
subscription.payment_failedagora, baul, camino, plenura, servilletaA subscription payment attempt failed — receiver apps surface a payment-failed banner to the tenant operator and may restrict feature access.
subscription.payment_receivedconstanza[auto-derived] subscription.payment_received event
subscription.pending_cancellationagora, camino, plenura, servilletaA subscription cancellation was scheduled for the end of the current billing period — receiver apps surface a notice that the subscription will end soon.
subscription.renewedcamino, constanza, mancha, plenura, servilletaA subscription was successfully renewed for a new billing period — receiver apps update the subscription period end date and resume any paused features.
subscription.suspendedagente, caracol, cosmos-pet, madrigueraA subscription was suspended due to non-payment or compliance issue — Camino disables access until resolution. Receiver apps lock out the tenant and surface a suspension banner.
subscription.trial_expiringcolectiva, comal, hoja, plenuraA trial subscription is expiring soon — receiver apps surface an upgrade prompt to the tenant operator.
subscription.trial_startedcolectiva, comal, hoja, plenuraA trial subscription was started — receiver apps activate trial-tier features for the new tenant.
team_member.createdconstanzaA new team member was added to a workspace in Camino — Constanza pre-registers the employee for fiscal/payroll onboarding.
team_member.deactivatedconstanzaA team member was deactivated in Camino — Constanza marks the employee as inactive and may trigger an IMSS baja process.
team_member.updatedconstanzaA team member's record was updated in Camino — Constanza syncs the changed fields on the employee record.

Events consumed

EventSendersDescription
activity.loggedagora, caracol, cosmos-pet, madrigueraA billable or tracked activity has been logged (time entry from Agora ghost timer, POS customer action in Caracol, vet/hotel log in Cosmos Pet or Madriguera) and sent to Camino for CRM activity tracking
appointment.completedcosmos-pet, plenuraA therapy or veterinary appointment has been completed and paid
bank_package.generatedritoRito generated a bank financing package — Constanza pre-prepares fiscal structure for the loan; Camino logs the activity.
booking.completedgoodbayA stay/booking has been completed at checkout — settlement signal (owner payout, RBS commission). PD-073 Slice 2 (S317): goodbay re-added as sender, now firing from /api/bookings/[id]/checkout. Camino receiver retains the Plenura-shape handler with source_app discriminator (S317 logistics.ts:20 guard — non-Plenura sourceApp ignored).
brain.signalcamino, colectivaCross-brain intelligence signal. Emitted by Camino (marketing/fiscal intelligence) and Colectiva (operational/financial intelligence) to share insights bidirectionally. Carries a typed signal with severity, priority, and actionable context.
capital_call.bulk_createdritoA pro-rata capital call was issued to multiple investors simultaneously in Rito — Camino logs the batch for CRM activity.
caracol.invoice.stampedcaracolA CFDI was stamped through Caracol's own PAC flow (not routed through Constanza). Distinct from cfdi.stamped which Constanza emits after stamping. Used for unified fiscal record + subscription metering.
caracol.order.createdcaracolA new order was created in Caracol POS — feeds Camino CRM order pipeline and activity feed
caracol.order.status_changedcaracolOrder status transition in Caracol POS (e.g., preparing → ready → delivered) — Camino mirrors for CRM timeline
caracol.shipment.createdcaracolA Skydropx shipment label was generated in Caracol — Camino records cost, applies markup, and bills the tenant. Also triggers WhatsApp tracking notification via Camino.
cfdi_global.stampedcaracolMonthly factura global (CFDI Público en General) successfully stamped by the monthly-cfdi-publico cron. Distinct from caracol.invoice.stamped (per-sale) — carries batch context (period, salesIds) for downstream fiscal reconciliation and subscription metering.
cfdi.stampedconstanzaA CFDI invoice has been stamped by the SAT via Constanza — receiver apps attach the UUID to their local invoice record and update status.
cofepris.expiringagenteAn Agente COFEPRIS permit is expiring within 30 days — triggers WhatsApp alert and CRM activity log in Camino
cpi.investor_update_postedcolectivaA CPI investor update was posted on a Colectiva offering — Camino sends email to each investor who purchased this offering.
cpi.purchasedcolectivaA CPI (Colectiva Participation Instrument) was purchased — Camino creates/updates contact with cpi_holder tag + logs purchase timeline; Constanza records sale for accounting.
cpi.transfer_completedcolectivaA CPI secondary market transfer completed — Camino sends buyer receipt + seller sale confirmation emails.
customer.createdcamino, caracol, comal, servilletaA new customer/contact/third-party record was created — used for CRM sync, fiscal pre-registration, and cross-app contact linking.
customer.identifiedmanchaA customer was identified during a transaction in Mancha (restaurant POS) — Camino creates or updates the CRM contact record with the transaction context for relationship tracking.
deadline.changedagoraAn existing legal deadline in Agora was updated (new date or description) — Camino mirrors for CRM timeline and reminder workflows
deadline.createdagoraA new legal deadline was set on a matter in Agora — Camino stores it for CRM visibility and deadline alerts
deal.createdritoA new real estate deal was created in Rito — Camino CRM logs the activity; Constanza pre-registers fiscal structure for the deal.
deal.intelligence_generatedritoRito's proactive intelligence engine completed analysis on a deal — Camino CRM tags the deal with recommended strategy and asset class.
deal.status_changedritoA real estate deal's status transitioned to a new value in Rito — Camino mirrors for CRM pipeline. Distinct from deal.stage_changed (investor pipeline).
delivery.confirmedbaulDelivery completed with proof of delivery (photos, signature)
demurrage.accumulatingagente[auto-derived] demurrage.accumulating event
deposit.completedbaulCash deposit completed at bank with proof (photo of slip, GPS). Baul physical layer event. Triggers expense creation in Constanza and agreement reconciliation in Colectiva.
distribution.completedcolectivaA participation distribution completed in Colectiva — Camino logs investor activity + sends confirmation email.
fiscal.anomaly_detectedconstanzaConstanza AI detected an unusual pattern in an organization's financial data (z-score outlier, Benford violation, duplicate transaction, timing anomaly, etc.). Routed to Camino for CRM health alerts and to Colectiva so the Brain can factor fiscal anomalies into business intelligence.
fiscal.compliance_riskconstanzaConstanza identified a SAT compliance risk for an organization: missing declarations, RFC issues, expired CSD certificate, or overdue obligations. Routed to Camino so the CRM can surface the alert and prompt the tenant to take corrective action.
fiscal.health_score_updatedconstanza[auto-derived] fiscal.health_score_updated event
garita.property.type_changedgarita[auto-derived] garita.property.type_changed event
handoff.completedbaulGeneric physical handoff completed with proof. Covers document delivery, product returns, sample collection, key handoff, equipment transfer. Baul physical layer event.
inventory.lowcaracol, comal, hojaA product inventory fell below the low-stock threshold — Colectiva records the alert for analytics; Camino logs it as a TenantIntelligence signal in organization_activity_log.
investor.createdritoA new LP investor was created in Rito — Camino receives the contact for CRM sync.
investor.nda_signedcolectivaAn investor signed an NDA for a CPI offering in Colectiva — Camino creates/updates contact with investor tags + logs timeline event.
investor.updatedritoAn LP investor record was updated in Rito — Camino syncs CRM fields.
invoice.failed(none declared)An invoice payment failed — Camino records the failure on the cobranza receivable and may trigger a dunning follow-up.
invoice.paidcolectivaAn invoice was paid — Camino marks the cobranza receivable as paid and logs the payment event on the CRM contact timeline.
labor_costs.updatedcolectiva, constanza[auto-derived] labor_costs.updated event
matter.assignedagoraAn attorney was assigned to a legal matter in Agora — Camino updates CRM contact-to-matter mapping for pipeline visibility
matter.status_changedagoraA legal matter's status changed in Agora (e.g., open → closed, active → on_hold) — Camino mirrors for CRM pipeline
note.createdagoraAgora attached a note to a matter that should appear in Camino CRM (client communication, case update, billing note).
owner.registeredmadrigueraA property or pet owner was registered in Madriguera — Camino creates a CRM contact, Colectiva records the new account for revenue tracking.
product.createdcomalA new product was created in Comal — Camino syncs to the CRM product catalog for cross-channel posting (e.g., TikTok catalog, social feeds).
product.deletedcomalA Comal product was deleted — Camino removes from cross-channel catalog mirrors.
product.updatedcomal[auto-derived] product.updated event
referral.createdpatadasA business has been referred to an RBS product via the marketplace
site_optimizer.scenario_selectedritoA Rito user selected a development scenario from the Site Optimizer — Camino records the investment intent for the fund/contact.
subscription.activatedcamino, colectivaA subscription plan has been activated for a tenant — all apps that gate features behind the subscription tier update their local tier state.
subscription.cancelledcamino, colectivaA subscription has been cancelled — all apps that gate features behind the subscription tier update their local tier state to free/cancelled.
subscription.payment_failedcamino, colectivaA subscription payment attempt failed — receiver apps surface a payment-failed banner to the tenant operator and may restrict feature access.
subscription.pending_cancellationcaminoA subscription cancellation was scheduled for the end of the current billing period — receiver apps surface a notice that the subscription will end soon.
subscription.renewedcamino, colectivaA subscription was successfully renewed for a new billing period — receiver apps update the subscription period end date and resume any paused features.
support.ticket_created(none declared)A support ticket was opened in any RBS app — Camino mirrors the ticket into support_tickets and runs CATTA Stage 1 classification (Haiku) for cross-app triage. Source app remains the system-of-record for the conversation thread; Camino centralizes triage + escalation + analytics. See docs/architecture/CAMINO_AI_TICKET_SUPPORT.md.
task.completedservilletaA gig task has been completed and accepted by the client on Servilleta — triggers payment release from escrow to tasker wallet
upsell.appointment_capacityplenuraPlenura free-tier therapist has hit or is approaching their monthly booking limit (5/month). Camino surfaces a Plenura Pro upgrade recommendation.
upsell.constanza_onboardingconstanzaConstanza detected an org has no active CSD certificate configured — prompts Camino to surface a CSD setup upsell.
upsell.declaration_serviceconstanzaConstanza detected an org with overdue declarations (>30 days) — prompts Camino to surface a managed-declarations upsell.
upsell.stamp_upgradeconstanzaConstanza detected an org whose stamp usage has exceeded 80% of its plan allocation — prompts Camino to surface a plan-upgrade upsell.
upsell.task_volumeservilletaServilleta free-tier tasker is at or near their active task limit (3 concurrent) or has reached a completed-task volume milestone (10/25/50). Camino surfaces a Pro Tasker upgrade recommendation.
walk.completedmadriguera[auto-derived] walk.completed event
wallet.deposit_completedcolectivaA CPI wallet deposit completed in Colectiva — Camino logs activity and sends deposit receipt email to the user.
wallet.withdrawal_completedcolectivaA CPI wallet SPEI withdrawal completed in Colectiva — Camino logs activity and sends withdrawal receipt email to the user.
workflow.actioncolectivaColectiva dispatches a workflow action to a target app — instructs the receiver to perform a specific operation (create employee, generate poliza, update record). Payload includes the action type and data needed by the receiver.

Webhook signature

Standard ecosystem HMAC-SHA256 over the raw body, with a 5-minute timestamp window and replay protection. See Webhooks for the verify recipe.

Gotchas

  • Every request from a partner app should carry a tenant identifier. Use X-Tenant-Id or resolve server-side via orgResolver — multi-tenant scoping is non-negotiable.
  • Refresh tokens are rotating. Always persist the new refresh token returned from /oauth/token.
  • The 21 OAuth clients are pre-registered (one per ecosystem app). New third-party integrations require a client registration ticket — they are not self-service today.
  • Subscription feature flags are authoritative here. Do not mirror tier state locally without a TTL — check via createSubscriptionClient on the hot path.

Red Broom Software Ecosystem