A lead represents a scope of work, job or sale in its early stages. A Lead can be converted into a Project later on.
Attributes
Attribute | Type | Description |
---|---|---|
id | String | The unique id of the Lead. |
tenant_id | Integer | The id of the Tenant the Lead belongs to. |
lead_connection_id | String | The id of the LeadConnection the Lead belongs to. |
transaction_id | String | The id assigned to the Lead when it was submitted. Multiple Leads submitted together will always have the same transaction id. |
created_by | Integer | The id of the User that created the Lead. |
project_id | Integer | The id of the Project the Lead corresponds to once the Lead has been successfully processed and converted. |
status | String | The current status of the Lead (queued, processing, converting, needs-review, ready, successful, error). |
received_at | DateTime | The date time of when the Lead was submitted to Contractors Cloud. |
validation_errors | Array | An array of errors outlining what needs to be fixed before the Lead can be converted into a project. |
derived_data | Array | An array of data that has been derived based on the raw, submitted Lead data. This data will be used to convert the Lead into a project. |
data | Array | An array of rudimentary data derived from the raw, submitted Lead data. This data is related to the defined field maps for the LeadConnection if available. |
status_message | String | A human readable message describing the current status of the Lead. |
created_at | DateTime | The date time of when the Lead was created. |
updated_at | DateTime | The date time of when the Lead was last updated. |
Allowed includes
Relation | Type | Description |
---|---|---|
creator | User | The User who created the Lead. |
project | Project | The resulting Project the Lead has been converted into. |
lead_connection | LeadConnection | The LeadConnection the Lead belongs to. |
Allowed filters
Name | Type | Description |
---|---|---|
id | Integer | Filter Projects by their id. |
lead_connection_id | String | Filter Leads to a specific LeadConnection. |
transaction_id | String | Filter Leads to a specific transaction id. |
status | String | Filter Leads to a specific status (queued, processing, converting, needs-review, ready, successful, error). |
search | String | Filter Leads to a specific search term. |
Allowed sorts
Name | Description |
---|---|
received_at | Sort Leads by when they where submitted. |
updated_at | Sort Leads by when they where last updated. |