RidgeCRM Developer Docs

Automation

Platform triggers

RidgeCRM platform automation, implemented as JavaScript handlers or webhooks.

Trigger definition

Platform triggers are org-owned definitions that decide when RidgeCRM should run code or call a webhook around record events. They are source-controlled extension points for teams that need deeper behavior than declarative automation rules.

FieldMeaning
objectTypeKeyThe object slot, such as Account, Lead, Case, or a custom object key.
triggerEventBefore/after create/update/delete or field-change style event.
handlerType`SOURCE_CODE` for sandboxed JavaScript or `WEBHOOK` for external delivery.
sourceCodeTenant-authored JavaScript source for SOURCE_CODE triggers.
orderExecution order when multiple triggers match.

Handler code

Source-code handlers are authored in Setup and run inside the tenant-code sandbox. Webhook handlers send a POST payload to the configured URL.

1

Record event

A create, update, delete, or field-change event enters the record service.

2

Trigger match

Active definitions match object type, event, order, and handler type.

3

Execute

RidgeCRM runs sandboxed source code or queues an outbound webhook.

4

Observe

Log outcomes, surface failures, and test behavior in an isolated org.

javascript

Conceptual handler registration

registerPlatformTriggerHandler('lead.enrich.afterCreate', async ({ record, orgId, prisma }) => {
  // Look up context, update fields, enqueue a webhook, or create follow-up work.
  return { recordId: record.id, orgId };
});

Webhook triggers

Webhook triggers turn record events into outbound HTTP calls. Document headers, signing expectations, queue behavior, retries, and payload shape before teams rely on them for production integrations.