Klantsynchronisatie

Klantsynchronisatie

Synchroniseer klantdata automatisch van je e-commerceplatform naar Brevo-contacten. Deze skill zorgt ervoor dat je Brevo-contactenlijst altijd je huidige klantenbestand weerspiegelt.

Overzicht

EigenschapWaarde
CategorieData Sync
StatusStable
Versie2.1
Triggerscustomer_created, customer_updated, customer_deleted
ActiesContact aanmaken, Contact bijwerken, Contact verwijderen

Hoe het werkt

graph LR
A[E-commerce Platform] -->|Customer Event| B[Customer Sync Skill]
B -->|Map Data| C[Field Mapping]
C -->|API Call| D[Brevo Contacts API]
D -->|Success| E[Contact Updated]
D -->|Error| F[Retry Queue]
  1. Event-detectie: Luistert naar klantlifecycle-events van je platform
  2. Datamapping: Koppelt platformvelden aan Brevo-contactattributen
  3. API-sync: Maakt, werkt bij of verwijdert contacten via de Brevo API
  4. Foutafhandeling: Probeert mislukte operaties opnieuw met exponentiële backoff

Configuratie

Basis-setup

skills:
customer-sync:
enabled: true
source: shopify # or woocommerce, magento, custom
# Map platform fields to Brevo attributes
field_mapping:
email: email
firstName: FIRSTNAME
lastName: LASTNAME
phone: SMS
# Sync options
options:
sync_mode: realtime # or batch
delete_behavior: soft # or hard
list_id: 5 # Add to this list

Veldmapping

Koppel de klantvelden van je platform aan Brevo-contactattributen:

Standaard veldmappings

Parameter Type Description
email required
string

E-mailadres van de klant. Wordt in Brevo gebruikt als unieke identifier.

firstName optional
string

Voornaam van de klant. Koppelt aan het FIRSTNAME-attribuut.

Default: FIRSTNAME
lastName optional
string

Achternaam van de klant. Koppelt aan het LASTNAME-attribuut.

Default: LASTNAME
phone optional
string

Telefoonnummer in E.164-formaat. Koppelt aan het SMS-attribuut voor WhatsApp/SMS.

Default: SMS
acceptsMarketing optional
boolean

Marketing-opt-instatus. Bepaalt de e-mailabonnementsstatus.

Default: true

Aangepaste attributen

Voeg aangepaste attribuutmappings toe voor e-commercedata:

field_mapping:
# Standard fields
email: email
firstName: FIRSTNAME
# Custom e-commerce attributes
totalOrders: TOTAL_ORDERS
totalSpent: TOTAL_SPENT
lastOrderDate: LAST_ORDER_DATE
customerTier: CUSTOMER_TIER
tags: TAGS

Tip

Maak attributen eerst aan: Aangepaste attributen moeten in Brevo worden aangemaakt voordat ze gesynchroniseerd kunnen worden. Gebruik het Brevo-dashboard of de API om ze aan te maken.

Triggers

customer_created

Wordt geactiveerd wanneer een nieuwe klant wordt aangemaakt in je platform.

{
"event": "customer_created",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"id": "cust_12345",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Smith",
"phone": "+1234567890",
"acceptsMarketing": true,
"createdAt": "2024-01-15T10:30:00Z"
}
}

customer_updated

Wordt geactiveerd wanneer klantinformatie wordt gewijzigd.

{
"event": "customer_updated",
"timestamp": "2024-01-15T14:45:00Z",
"data": {
"id": "cust_12345",
"email": "[email protected]",
"changes": {
"phone": {
"old": null,
"new": "+1234567890"
}
}
}
}

customer_deleted

Wordt geactiveerd wanneer een klant uit je platform wordt verwijderd.

{
"event": "customer_deleted",
"timestamp": "2024-01-15T16:00:00Z",
"data": {
"id": "cust_12345",
"email": "[email protected]",
"deletedAt": "2024-01-15T16:00:00Z"
}
}

Acties

Contact aanmaken

Maakt een nieuw contact aan in Brevo wanneer een klant wordt aangemaakt.

POST /v3/contacts

Maak een nieuw contact aan in je Brevo-account

Query Parameters

Parameter Description
email string required
E-mailadres van het contact
attributes object optional
Contactattributen
listIds array optional
Lijst-ID's waar het contact aan toegevoegd moet worden
updateEnabled boolean optional
Bijwerken als het contact bestaat
Default: false

Responses

201 Contact succesvol aangemaakt
400 Ongeldige aanvraagparameters
409 Contact bestaat al

Contact bijwerken

Werkt een bestaand contact bij wanneer klantdata verandert.

PUT /v3/contacts/{identifier}

Werk de attributen van een bestaand contact bij

Path Parameters

Parameter Description
identifier string required
E-mail of contact-ID

Query Parameters

Parameter Description
attributes object optional
Bij te werken attributen
listIds array optional
Lijsten waar het contact aan toegevoegd moet worden
unlinkListIds array optional
Lijsten waar het contact uit verwijderd moet worden

Responses

204 Contact succesvol bijgewerkt
400 Ongeldige aanvraagparameters
404 Contact niet gevonden

Contact verwijderen

Verwijdert een contact wanneer een klant wordt verwijderd.

DELETE /v3/contacts/{identifier}

Verwijder een contact definitief uit Brevo

Path Parameters

Parameter Description
identifier string required
E-mail of contact-ID

Responses

204 Contact succesvol verwijderd
404 Contact niet gevonden

Codevoorbeelden

JavaScript (Node.js)

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
// Enable customer sync skill
await tajo.skills.enable('customer-sync', {
source: 'shopify',
fieldMapping: {
email: 'email',
firstName: 'FIRSTNAME',
lastName: 'LASTNAME',
totalOrders: 'TOTAL_ORDERS',
totalSpent: 'TOTAL_SPENT'
},
options: {
syncMode: 'realtime',
listId: 5
}
});
// Manually trigger a sync
await tajo.skills.trigger('customer-sync', {
event: 'customer_created',
data: {
firstName: 'Jane',
lastName: 'Smith'
}
});

Python

from tajo import TajoClient
tajo = TajoClient(
api_key=os.environ['TAJO_API_KEY'],
brevo_api_key=os.environ['BREVO_API_KEY']
)
# Enable customer sync skill
tajo.skills.enable('customer-sync', {
'source': 'woocommerce',
'field_mapping': {
'email': 'email',
'first_name': 'FIRSTNAME',
'last_name': 'LASTNAME',
'total_orders': 'TOTAL_ORDERS'
},
'options': {
'sync_mode': 'realtime',
'list_id': 5
}
})
# Manually trigger a sync
tajo.skills.trigger('customer-sync', {
'event': 'customer_updated',
'data': {
'email': '[email protected]',
'total_orders': 10,
'total_spent': 1250.00
}
})

Monitoring

Sync-statusdashboard

Volg de prestaties van je sync in het Tajo-dashboard:

  • Sync Success Rate: Percentage geslaagde syncs
  • Gemiddelde latency: Tijd van event tot Brevo-update
  • Foutpercentage: Mislukte sync-pogingen
  • Queue-diepte: Openstaande sync-operaties

Webhook-notificaties

Ontvang notificaties voor sync-events:

notifications:
webhook_url: https://your-app.com/webhooks/tajo
events:
- sync_completed
- sync_failed
- batch_completed

Problemen oplossen

Veelvoorkomende problemen

Contact bestaat al (409)

Zet updateEnabled: true aan in je configuratie om bestaande contacten bij te werken in plaats van te falen.

FoutOorzaakOplossing
Contact already existsContact met dit e-mailadres bestaatZet updateEnabled: true aan
Invalid attributeAttribuut bestaat niet in BrevoMaak het attribuut eerst aan in Brevo
Rate limit exceededTe veel API-aanvragenGebruik batch-sync-modus
Invalid email formatOnjuist e-mailadresValideer e-mailadressen vóór de sync

Debug-modus

Activeer debug-logging voor probleemoplossing:

skills:
customer-sync:
debug: true
log_level: verbose

Gerelateerde skills

Volgende stappen

  1. Configureer veldmappings voor je platform
  2. Stel aangepaste attributen in in Brevo
  3. Activeer realtime sync voor directe updates

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

AI-assistent

Hallo! Stel me vragen over de documentatie.

Start gratis met Brevo