Skip to content

Webhooks - Product Requirements Document

Version: 2.0 | Status: Ready for Review | Date: 2026-01-15


Change Log

VersionDateAuthorChanges
1.02026-01-09Technical Documentation TeamInitial draft
2.02026-01-15Product ManagementConverted to business-focused format with measurable outcomes

1. Executive Summary

1.1 Purpose

The Webhooks system enables rental companies to receive real-time notifications when events occur in Toprent.app, eliminating manual data synchronization and enabling automated workflows with external business systems.

1.2 Problem Statement

Rental companies integrate Toprent.app with external systems including:

  • CRM platforms for customer data synchronization
  • Accounting software for financial record keeping
  • Marketing automation tools for customer engagement
  • Analytics platforms for data aggregation

Current Pain Points:

  • Manual Data Export: Staff spend 2-4 hours weekly exporting and importing customer data between systems
  • Data Latency: Without real-time sync, external systems operate on stale data (24-48 hour delays)
  • Integration Costs: Custom polling-based integrations cost $5,000-15,000 to build and maintain
  • Error Prone: Manual transfers cause 5-10% data entry errors requiring correction

1.3 Business Value

Value AreaMeasurable OutcomeTarget
Time SavingsEliminate manual data export/import between systems2-4 hours/week saved per admin
Data AccuracyReduce data synchronization errors from manual entry90% reduction in sync-related errors
Integration CostReduce custom integration development effort60% lower integration costs vs. polling
Data FreshnessNear real-time data availability in external systems<5 second delivery latency
API EfficiencyReduce polling-based API requests from integrations95% fewer API calls per integration

1.4 Target Users

User RolePrimary GoalsBusiness Impact
AdminConfigure webhook endpoints, test delivery, manage subscriptionsControls data flow to external systems
Integration DeveloperBuild external integrations consuming webhook eventsReduces integration development time
Operations ManagerMonitor integration health, troubleshoot issuesEnsures business process continuity

1.5 Scope

In Scope (MVP):

  • Webhook endpoint registration per tenant
  • Client creation event notifications (ON_CREATE_CLIENT)
  • HTTPS-only secure delivery
  • Settings UI for webhook management
  • Test webhook functionality

Out of Scope (Future Phases):

  • Delivery retry mechanism with exponential backoff
  • Webhook delivery history/audit logs
  • Additional event types (orders, vehicles, payments)
  • Webhook payload filtering/customization
  • Failed delivery alerting
  • Webhook signature verification (HMAC-SHA256)

2. Success Metrics

2.1 Measurement Framework

MetricDefinitionBaselineTargetMeasurement MethodTimeframe
Integration Setup TimeTime from start to working webhook integration8-16 hours (polling)<2 hoursUser surveys, support tickets3 months
Manual Data Export HoursWeekly admin hours spent on manual CRM/accounting sync2-4 hours/admin<30 minutesTime tracking surveys6 months
Data Sync ErrorsCustomer record mismatches between systems5-10% error rate<1% error rateMonthly CRM reconciliation audits6 months
Webhook Delivery SuccessPercentage of webhooks delivered successfullyN/A>95%Sentry error logs, delivery monitoringOngoing
Adoption RatePercentage of tenants with active webhooks0%25% of active tenantsDatabase webhook configuration count6 months
API Polling ReductionDecrease in polling API calls from integrationsCurrent call volume80% reductionAPI gateway analytics6 months

2.2 Baseline Data Sources

  • Integration Setup Time: Customer onboarding records, support ticket analysis
  • Manual Export Hours: Admin surveys, time tracking data
  • Data Sync Errors: CRM audit reports, customer complaints
  • Webhook Delivery: Sentry error tracking, HTTP response logging

3. User Stories

3.1 Admin User Stories

PriorityUser StoryAcceptance Criteria
P0As an admin, I can register a webhook URL so that my CRM receives automatic client notificationsGiven I’m in Settings > Webhooks, When I enter an HTTPS URL and select ON_CREATE_CLIENT, Then the webhook is saved and visible in my webhook list
P0As an admin, I can test my webhook integration so that I verify it’s working before relying on itGiven I have a configured webhook, When I click “Send Test”, Then a sample payload is delivered to my endpoint within 5 seconds
P1As an admin, I can update my webhook URL so that I can change endpoints without losing configurationGiven I have an existing webhook, When I edit the URL and save, Then future events deliver to the new URL
P1As an admin, I can delete webhooks so that I can remove integrations no longer neededGiven I have configured webhooks, When I delete one, Then events no longer deliver to that endpoint
P2As an admin, I can view all configured webhooks so that I understand what integrations are activeGiven I navigate to Settings > Webhooks, When the page loads, Then I see all my webhooks with URL and event type

3.2 Integration Developer User Stories

PriorityUser StoryAcceptance Criteria
P0As a developer, I can receive client data via webhook so that my system stays synchronizedGiven a webhook is configured, When a new client is created, Then my endpoint receives a POST with complete client data
P1As a developer, I can examine test payloads so that I can build my integration correctlyGiven I receive a test webhook, When I parse the JSON, Then I can see all available client fields including name, email, phone, and metadata

3.3 Operations Manager User Stories

PriorityUser StoryAcceptance Criteria
P1As an operations manager, I can verify webhook delivery so that I ensure integrations are workingGiven I create a client, When I check my external system, Then the client data appears within 30 seconds

4. Functional Requirements

4.1 Webhook Registration

IDRequirementBusiness Rationale
FR-4.1.1Admins can create, update, view, and delete webhooksEnables self-service integration management
FR-4.1.2Only HTTPS URLs are accepted for webhook endpointsEnsures PII data is transmitted securely
FR-4.1.3Each webhook URL must be unique within a tenantPrevents duplicate deliveries and configuration confusion
FR-4.1.4Webhooks are isolated per tenant with no cross-tenant visibilityMaintains data privacy and security

4.2 Event Delivery

IDRequirementBusiness Rationale
FR-4.2.1Client creation triggers immediate webhook delivery with complete client dataExternal systems receive real-time updates
FR-4.2.2Webhook payloads include all client fields: name, email, phone, VIP status, addresses, documents, creator info, timestampsIntegrations have full context without additional API calls
FR-4.2.3Webhook delivery does not block client creation operationsCore business functions remain unaffected by integration issues
FR-4.2.4Failed deliveries are logged for monitoring (no automatic retry in MVP)Operations can identify and troubleshoot integration issues

4.3 User Interface

IDRequirementBusiness Rationale
FR-4.3.1Settings page provides webhook management with create, edit, delete, and test functionsAdmins can manage integrations without technical support
FR-4.3.2URL validation prevents non-HTTPS submissions with clear error messagesGuides admins toward secure configurations
FR-4.3.3Test webhook sends realistic sample data matching production payload structureDevelopers can validate integrations before production use

4.4 Security & Compliance

IDRequirementBusiness Rationale
FR-4.4.1Webhook operations require admin authenticationPrevents unauthorized integration configuration
FR-4.4.2Webhook URLs are not logged in plain textProtects integration endpoints from exposure
FR-4.4.3Admins are responsible for ensuring receiving endpoints comply with GDPR/data protectionMaintains data protection compliance chain

5. Business Rules

5.1 Configuration Rules

  • BR-5.1.1: Each tenant can configure multiple webhooks for the same event type
  • BR-5.1.2: Only HTTPS URLs are permitted (HTTP rejected)
  • BR-5.1.3: Webhook URLs must be unique per tenant (no duplicates)
  • BR-5.1.4: Only admins can configure webhook endpoints

5.2 Delivery Rules

  • BR-5.2.1: Webhooks trigger only on successful client creation (failed creates do not trigger)
  • BR-5.2.2: Webhook delivery failure does not rollback the client creation
  • BR-5.2.3: Each configured webhook receives its own delivery attempt
  • BR-5.2.4: Best-effort delivery (no guaranteed delivery in MVP)

5.3 Data Privacy Rules

  • BR-5.3.1: Webhook payloads contain full client PII (name, email, phone, documents)
  • BR-5.3.2: Webhook data flows are subject to GDPR data transfer requirements
  • BR-5.3.3: Cross-tenant data access is prohibited

6. Acceptance Criteria

6.1 Core Functionality

  • Admin can create webhook with HTTPS URL and ON_CREATE_CLIENT type
  • Admin can update, view, and delete existing webhooks
  • System rejects HTTP URLs with clear error message
  • System prevents duplicate webhook URLs within same tenant
  • Tenant A cannot see or modify webhooks from Tenant B

6.2 Event Delivery

  • Creating a client triggers webhook delivery within 5 seconds
  • Webhook receives HTTP POST with JSON payload containing complete client data
  • Client creation completes successfully even if webhook endpoint is unavailable
  • Failed deliveries appear in Sentry monitoring

6.3 User Interface

  • Settings > Webhooks page displays all configured webhooks
  • Create/edit forms validate HTTPS URLs before submission
  • Test webhook button sends sample payload and displays success/failure feedback
  • Webhook list updates immediately after create/update/delete operations

6.4 Integration Validation

  • External endpoint can successfully receive and parse webhook payload
  • Multiple webhooks for same event all receive deliveries
  • Payload structure is documented and consistent

7. Dependencies

7.1 Upstream Dependencies

SystemDependency TypeImpact if Unavailable
Client ServiceEvent trigger sourceWebhooks won’t fire on client creation
Authentication SystemUser context for mutationsCannot configure webhooks
Multi-Tenant ArchitectureTenant isolationSecurity boundary compromised

7.2 Downstream Dependencies

SystemDependency TypeImpact if Unavailable
External Webhook EndpointsDelivery targetEvents delivered but not received
SentryError loggingFailed deliveries not tracked

7.3 Data Requirements

  • Webhook configuration storage with tenant isolation
  • Unique constraint enforcement on URL + tenant combination

8. Risks & Mitigations

RiskLikelihoodImpactMitigation
External endpoints unavailableHighMediumDelivery failures logged; don’t block operations
PII transmitted to insecure endpointsMediumHighHTTPS enforcement; admin responsibility documented
Webhook delivery impacts client creation latencyLowMediumAsync delivery in future phase if needed
No retry mechanism causes missed eventsMediumMediumDocumented limitation; retry planned for v2

9. Future Enhancements (Post-MVP)

EnhancementBusiness ValuePriority
Delivery retry with exponential backoffImproves delivery reliability to 99%+High
Webhook delivery history/logsEnables troubleshooting and audit complianceHigh
Additional event types (orders, vehicles, payments)Expands integration use casesHigh
Webhook signature verification (HMAC-SHA256)Enables endpoint authenticationMedium
Failed delivery alertingProactive issue notificationMedium
Configurable delivery timeoutAccommodates slow endpointsLow

10. Glossary

TermDefinition
WebhookHTTP callback that sends real-time event notifications to external systems
Event TypePlatform event that triggers webhook delivery (currently: ON_CREATE_CLIENT)
PayloadJSON data sent in webhook POST body containing event details
TenantIsolated customer organization in the multi-tenant system
PIIPersonally Identifiable Information (names, emails, phone numbers)

Document Status: Ready for Review
Last Updated: 2026-01-15
Author: Product Management
Reviewers: Business Stakeholders, Engineering Lead, Security Team