For partners
Handling sync events and updates
Book-sync records are full images to upsert, never new business.
policy.sync.created events carry a full image of a policy, usually during a book sync after a new connection. Match on carrier NAIC plus policy number and upsert. Don’t create a new-business record, and ack with mode upsert:
await relay.events.ack(accessToken, event.id, { result: "APPLIED", mode: "upsert" });policy.transaction.created events are individual transactions: new business, changes, renewals, cancellations. The summary.type code tells you which. If you can’t apply one, ack REJECTED with a reason the agency will read.