Skip to main content

Overview

The customer.updated webhook is triggered when an existing customer’s information is updated in your Metrifox account.

When It’s Triggered

This event is sent immediately after a customer is successfully updated through:
  • The Metrifox API (PUT /api/v1/customers/{customer_key})
  • Any other customer update method

Payload Structure

{
  "id": "550e8400-e29b-41d4-a716-446655440001",
  "type": "customer.updated",
  "created_at": 1704067260000,
  "data": {
    "customer": {
      "id": "123",
      "customer_key": "cust_abc123",
      "name": "John Doe Updated",
      "email": "john.updated@example.com",
      "tenant_id": "456",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:01:00Z"
      // ... other customer fields
    }
  }
}

Data Fields

The data.customer object contains the complete updated customer record with all current field values, including:
  • id: Internal customer ID
  • customer_key: The unique customer key (immutable, unchanged on updates)
  • name: Updated customer name
  • email: Updated customer email address
  • tenant_id: The tenant ID this customer belongs to
  • created_at: Original timestamp when the customer was created
  • updated_at: Timestamp when the customer was updated (this event)
  • Additional custom fields as configured
The customer_key field is immutable and will not change even if other customer information is updated.

Example Use Cases

  • Sync customer updates to your CRM system
  • Update customer records in external systems
  • Trigger workflows based on customer information changes
  • Audit customer data changes