Skip to content

Brekz Front Helpdesk

Terug naar Brekz

Helpdesk Platform

Front is het centrale helpdesk platform voor alle Brekz customer support. Contactformulieren van de website worden automatisch in Front ingevoerd, met directe integratie naar order- en klantgegevens via de Brekz backend.

  • Contact form automation
  • Order en customer lookup via backend
  • Webhook integratie voor message synchronisatie
Aspect Details
Type Integratie
Repository brekz-group/brekz-shop-backend

Omgevingen

Omgevingscode: BRKZ Front

URL: Front App

Backend API Endpoints

Front integreert met de Brekz backend via drie API endpoints voor real-time customer en order lookup:

Customer Lookup

GET /api/front/customers?email={customer_email}

Beschrijving: Haalt klantgegevens op basis van email adres.

Response: JSON array met klantinformatie (naam, adres, telefoonnummer, etc.)

Gebruik: Front gebruikt dit wanneer een support agent een customer opzoekt op basis van email.

Order Lookup

GET /api/front/orders/{order_id}

Beschrijving: Haalt orderdetails op basis van order ID.

Response: JSON met order status, items, totaal prijs, verzendadres, etc.

Gebruik: Support agents kunnen snel order status en details zien in Front.

Comment toevoegen

POST /api/front/orders/{order_id}/comment

Body:

{
  "comment": "Beschrijving van het probleem",
  "email": "support@brekz.nl"  // Optional, default: f.kwakkenbos@flooris.nl
}

Beschrijving: Voegt een comment toe aan een order in PrestaShop op basis van Front conversations.

Webhooks

Front stuurt webhooks terug naar Brekz wanneer events plaatsvinden in conversations:

Webhook Endpoint

POST /api/front/customer/webhook

Security: Alle webhooks zijn beveiligd met HMAC-SHA256 signatures. Headers: - x-front-signature - HMAC-SHA256 signature - x-front-request-timestamp - Request timestamp - x-front-challenge - Challenge string voor validatie

Events: - Conversation created - Message added - Customer updated - Tags changed

Webhook Processing: 1. Signature validatie (FrontCustomerController::webhook()) 2. Event dispatching (FrontWebhookEvent) 3. Database logging (FrontWebhookSaveDatabaseListener) 4. Incoming message processing (FrontWebhookIncomingListener)

Cronjobs & Commands

Weekly Webhook Summary

Schedule: Elke week (via console.php)

Schedule::command(FixCurrentFrontLogsCommand::class, ['--this-week'])->weekly();

Beschrijving: Verwerkt en summarisert alle webhook logs van de afgelopen week. Dit helpt bij het opsporen van eventuele integratieproblemen.

Contact Update Command

Commando:

php artisan front:update-contact {webhook_id?} {--from-date=} {--to-date=}

Beschrijving: Herpush webhook updates naar Front. Handig voor het resynchroniseren van customer contactgegevens na updates.

Opties: - webhook_id - Specifieke webhook (optional) - --from-date - Startdatum (optional) - --to-date - Einddatum (optional, default: vandaag)

Voorbeeld:

# Resync webhook met ID 123
php artisan front:update-contact 123

# Resync alle webhooks van gister
php artisan front:update-contact --from-date=2026-08-04 --to-date=2026-08-04

Health Checks

Endpoint: /health

De Brekz backend voert elke minuut health checks uit:

Schedule::command(RunHealthChecksCommand::class)->everyMinute();

Dit monitort: - Backend API availability - Database connectivity - Third-party service integrations (o.a. Front)

Health check resultaten zijn beschikbaar op https://brekz-backend.production/health

Database Tables

FrontWebhookSummary

Slaat weekly summaries op van Front webhook activity:

  • week_start_date - Start van de week
  • total_messages - Totaal aantal messages
  • total_conversations - Totaal aantal conversations
  • created_at - Timestamp

Webhook

Slaat alle incoming webhooks op:

  • request_body - Raw webhook payload
  • headers - Webhook headers (voor signature validatie)
  • created_at - Timestamp

Configuratie

Front integratie wordt geconfigureerd via environment variables in .env:

FRONT_WEBHOOK_SIGNING_KEY=<signing_key_from_front>
FRONT_API_TOKEN=<api_token_from_front>

Front Credentials

Login gegevens voor Front zijn beschikbaar in 1Password: Brekz - Front (Vault: Brekz)

Gerelateerde Documentatie

Front Knowledge Base Brekz Shop Backend Repo Front API Documentation