What is VoicePact Analytics?
VoicePact Analytics provides business intelligence on voice-based contracts by extracting, transforming, and loading (ETL) operational data into a dedicated analytics database. This enables stakeholders to gain insights into contract performance, payment patterns, and user behavior without impacting the production system.Key Capabilities
Business Metrics
The analytics system tracks critical business metrics including:- Contract Performance: Time to completion, completion rates, and contract statuses
- Payment Analytics: Total amounts released, payment velocities, and escrow patterns
- User Activity: Buyer and seller participation, contract types, and product categories
- Temporal Patterns: Contract creation trends, completion timelines, and seasonal patterns
Data Model
The analytics database uses a dimensional model centered around a fact table that consolidates contract, party, and payment information:Fact Table: fct_contracts_summary
This is the primary analytics table containing:
| Column | Type | Description |
|---|---|---|
contract_id | String | Unique contract identifier |
contract_type | String | Type of contract (agricultural_supply, service_agreement, etc.) |
contract_status | String | Current status (pending, active, completed, etc.) |
contract_total_amount | Decimal | Total contract value |
currency | String | Currency code (e.g., KES) |
product | String | Product/service being contracted |
created_at | Datetime | Contract creation timestamp |
completed_at | Datetime | Contract completion timestamp |
time_to_completion_days | Integer | Days from creation to completion |
buyer_phone | String | Buyer’s phone number |
seller_phone | String | Seller’s phone number |
total_paid_released | Decimal | Total amount released from escrow |
Source Data
The ETL pipeline extracts data from three operational tables:- contracts: Core contract information including terms, amounts, and status
- contract_parties: Buyer, seller, mediator, and witness information
- payments: Payment transactions and escrow releases
Example Queries
Once the ETL pipeline has run, you can query the analytics database for insights:Total Contracts by Type
Average Time to Completion
Payment Release Rate
Top Products by Volume
Monthly Contract Trends
Architecture
Separation of Concerns
VoicePact uses a separate analytics database to:- Prevent query interference: Heavy analytical queries don’t impact production performance
- Enable schema optimization: The analytics schema is denormalized for query performance
- Support data retention: Historical snapshots can be maintained independently
- Facilitate external integrations: BI tools can connect without production access
ETL Process
The ETL pipeline follows a classic three-stage approach:- Extract: Queries the production database to retrieve raw contract, party, and payment data
- Transform: Cleans, enriches, and joins data to create analytics-ready summaries
- Load: Writes the transformed data to the analytics database
Use Cases
Business Intelligence
- Track contract completion rates by type
- Identify bottlenecks in the contract lifecycle
- Monitor payment release patterns
- Analyze seasonal trends in contract creation
Operational Monitoring
- Detect anomalies in contract processing times
- Monitor escrow fund flows
- Track user engagement by phone number
- Identify high-value contracts requiring attention
Product Development
- Understand which contract types are most popular
- Analyze feature usage patterns
- Identify opportunities for automation
- Measure the impact of product changes
Next Steps
- Learn how to set up and run the ETL pipeline
- Explore the source database schema
- Connect a BI tool like Metabase or Apache Superset to the analytics database