LeadCreatedEvent
Sodtrack sends this payload when a new lead is created in the platform, regardless of the channel it originated from: the admin panel, the customer web, the Integration API or a referral raised by a…
POST with Content-Type: application/json to the endpoint configured for your tenant. See webhooks overview for delivery and security guidance.Payload
{
"id": 1001,
"reference": "EXT-REF-0001",
"status": "created",
"customerName": "John",
"customerFullName": "Doe",
"customerEmail": "john.doe@example.com",
"customer": {
"id": 2001,
"email": "john.doe@example.com",
"phone": "+56900000000",
"name": "John",
"lastname": "Doe",
"identification_number": "11111111-1"
},
"address": {
"id": 3001,
"address": "Av. Example 123",
"formattedAddress": "Av. Example 123, Santiago, Región Metropolitana, Chile",
"coordinate": {
"lng": -70.65,
"lat": -33.45
}
},
"service": {
"id": 4001,
"name": "Sample Service"
},
"leadUrl": "https://network.example.com/leads/1001",
"createdBy": "technician@example.com"
}Purpose
Sodtrack sends this payload when a new lead is created in the platform, regardless of the channel it originated from: the admin panel, the customer web, the Integration API or a referral raised by a technician from the provider mobile app.
The payload is a snapshot of the lead at the moment of creation, together with the customer, the address and the service it refers to, so the receiving system can register the opportunity without any additional call to Sodtrack.
Trigger Condition
This webhook is triggered when:
-
A new lead has been successfully persisted in the Sodtrack system, and
-
The lead has been initialized with the
"created"status.
The event is emitted immediately after the lead row is saved, before the lead's form answers are persisted and before the lead's final trigger is resolved.
Example Use Cases
-
Register new sales opportunities in an external CRM in real time.
-
Trigger qualification or follow-up workflows for incoming leads.
-
Keep third-party dashboards synchronized with lead generation activity.
Field Definitions
📋 Lead
| Field | Type | Description |
|---|---|---|
id | number | Unique Sodtrack lead ID. |
reference | string | External reference supplied by the originating system. null when the lead was not created through the Integration API. |
status | string | Lead status. Always created in this event. |
customerName | string | Customer first name, as captured when the lead was created. |
customerFullName | string | Customer last name, as captured when the lead was created. |
customerEmail | string | Customer email, as captured when the lead was created. |
leadUrl | string | Direct link to the lead in the Sodtrack network panel. |
createdBy | string | Email of the user that triggered the creation. system when no user is associated with the request. |
🧍 Customer — customer
Current values read from the customer record at the moment the event is emitted. The whole object is null when the lead has no customer associated.
| Field | Type | Description |
|---|---|---|
customer.id | number | Sodtrack customer ID. |
customer.email | string | Customer email address. |
customer.phone | string | Customer phone number. |
customer.name | string | Customer first name. |
customer.lastname | string | Customer last name. |
customer.identification_number | string | Customer national identification number. |
🏠 Address — address
Address where the referred service will be performed. The whole object is null when the lead has no address associated.
| Field | Type | Description |
|---|---|---|
address.id | number | Sodtrack address ID. |
address.address | string | Address as entered. |
address.formattedAddress | string | Normalized address as resolved by Sodtrack. |
address.coordinate | object | Geographic coordinate of the address. null when the address has no coordinate. |
address.coordinate.lng | number | Longitude. |
address.coordinate.lat | number | Latitude. |
🛠️ Service — service
| Field | Type | Description |
|---|---|---|
service.id | number | Sodtrack service ID. |
service.name | string | Service name. |
Payload Example
{
"id": 1001,
"reference": "EXT-REF-0001",
"status": "created",
"customerName": "John",
"customerFullName": "Doe",
"customerEmail": "john.doe@example.com",
"customer": {
"id": 2001,
"email": "john.doe@example.com",
"phone": "+56900000000",
"name": "John",
"lastname": "Doe",
"identification_number": "11111111-1"
},
"address": {
"id": 3001,
"address": "Av. Example 123",
"formattedAddress": "Av. Example 123, Santiago, Región Metropolitana, Chile",
"coordinate": {
"lng": -70.6500000,
"lat": -33.4500000
}
},
"service": {
"id": 4001,
"name": "Sample Service"
},
"leadUrl": "https://network.example.com/leads/1001",
"createdBy": "technician@example.com"
}
Business Rules & Constraints
When the webhook is sent
-
The event is emitted for every lead created in Sodtrack. The payload carries no field identifying the origin channel, so referrals, admin-created leads and Integration API leads cannot be told apart from the payload alone.
-
The event is emitted asynchronously. A delivery failure does not affect the creation of the lead.
Snapshot fields vs. live customer data
-
customerName,customerFullNameandcustomerEmailare stored on the lead when it is created and never change afterwards. -
The
customerobject is read from the customer record at the moment the event is emitted. -
Both are identical for a newly created lead, but they diverge if the customer later updates their profile. Use the
customerobject as the source of truth for contact data.
Nullable objects
-
customer,addressandservicecan each benullas a whole, not only their inner fields. A lead can be created without an address, and a receiver must not assume the objects are present. -
address.coordinateisnullwhen the address was registered without geolocation.
Data and format
-
All identifiers are delivered as numbers.
-
address.coordinateis a flat object withlngandlatproperties. It is not GeoJSON. -
customerFullNameholds the customer's last name, despite its name.