brekz-copernica¶
The brekz-copernica service is part of the Brekz platform.
This document describes its purpose, responsibilities, and key information for developers working on or with this service.
Purpose¶
The purpose of brekz-copernica is to synchronize customer, product, order, and cart data between Brekz Prestashop and the Copernica marketing platform.
This service ensures that customer profiles and marketing data remain accurate and up-to-date, allowing personalized communication and campaigns to be effectively managed through Copernica.
Technical Flows¶
🔧 Click to view a detailed technical flow
sequenceDiagram
Customer ->> brekz-prestashop: Update newsletter opt-in
brekz-prestashop ->> brekz-copernica: Send customer update via API
brekz-copernica ->> Copernica API: Sync customer profile
Scheduler ->> brekz-copernica: Trigger background jobs
brekz-copernica ->> Copernica API: Sync products, orders, carts
Technical Overview¶
| Type | Technology |
|---|---|
| Language | PHP 8.0 |
| Framework | Laravel |
| Database | MySQL |
| Queue System | Redis + Laravel Horizon |
| API Type | RESTful API |
Main Responsibilities¶
- Synchronize customer profile data (e.g., newsletter opt-ins) between Brekz Prestashop and Copernica.
- Handle subscribe and unsubscribe actions from the Brekz website.
- Periodically sync product, order, and cart data via scheduled background jobs.
- Execute customer discount group synchronization for Copernica views.
- Log key actions and exceptions to centralized logging channels.
Monitoring & Alerts¶
- Laravel logs → [central logging service link or documentation]
- Dedicated log channel: customer_group_sync
- Health checks exposed at /api/health
- Horizon dashboard for queue monitoring
- PagerDuty alerts for critical failures
Feature Dependencies¶
Upstream: brekz-prestashop (provides customer & order data).
Downstream: Copernica API (receives synchronized data for marketing).
```mermaid flowchart LR brekz-prestashop --> brekz-copernica brekz-copernica --> Copernica_API