Platform Events & Webhooks

Pinion publishes Salesforce Platform Events at key lifecycle transitions. Subscribing to them is the decoupled way to integrate: instead of polling Pinion for changes, an external system, a Flow, or integration middleware reacts the moment something happens — a subscription is created, an approval is decided, a quote document is generated.

Each event is a thin notification: it carries the record keys and what changed, not the full record. On receipt, a subscriber re-queries the referenced record for detail. Keeping the payload thin means the record stays the single source of truth, and a subscriber that reconnects after downtime always reads current state.

How to subscribe

  • Flow — a platform-event-triggered Flow reacts in-org (send a notification, call an external service via an outbound action).
  • Apex trigger — an after insert trigger on the platform event for in-org orchestration.
  • External clients — subscribe over the Salesforce Streaming API (CometD) or Pub/Sub API to drive an off-platform system (a billing sync, an ERP handoff).
  • Change Data Capture — for field-level change tracking on the underlying objects (e.g. Subscription__c), enable CDC as a complement to these lifecycle events.

The events

SubscriptionChanged__e

Fires when a subscription is created or changed — close-won, amendment, or renewal. Payload: SubscriptionId__c, ContractId__c, AccountId__c, ProductId__c, ChangeType__c, EffectiveDate__c. Typical use: trigger a billing or ERP sync. On receipt, re-query the subscription and its committed terms, then push to the downstream system. This is the sync signal the usage-billing integration is built on.

ApprovalSubmitted__e

Fires when an approval request is submitted. Payload: RequestId__c, ParentId__c (the record under approval), ApproverUserId__c, RuleId__c, RuleName__c, Reason__c, DueAt__c. Typical use: notify an approver through an external channel, or surface a pending approval on an off-platform dashboard, including its SLA due time.

ApprovalDecided__e

Fires when an approval request is decided. Payload: RequestId__c, ParentId__c, ApproverUserId__c, Decision__c, Comment__c, RuleId__c, RuleName__c. Typical use: react to an approve/reject downstream — advance an external workflow, post the decision and comment to a channel, or update a system of record.

DocumentGenerated__e

Fires when a quote or proposal document is generated. Payload: GeneratedQuoteId__c, ContentDocumentId__c, QuoteId__c, OpportunityId__c, QuoteTemplateId__c, Format__c, TotalPrice__c, GeneratedDate__c. Typical use: route the generated document onward — send it to an e-signature service (DocuSign, Adobe Acrobat Sign), file it in external storage, or hand it to a CLM system. ContentDocumentId__c locates the file; TotalPrice__c and the quote/opportunity keys give the routing context.