Renders a lead.
Statuses which may be returned in the "status" parameter:
0 = open
1 = pending
10 = won
11 = lost
12 = cancelled
◆ _render()
Renders a lead.
{
"id": 42,
"entityType": "Leads",
"rev": "7",
"name": "Lead–32",
"htmlUrl": "https://app01.nutshell.com/lead/1234",
"avatarUrl": "/avatar/accounts/6/1/13cd44673d30fbd542a374d3beeabd6dc270302b8dd1d983e9a3a15bcdc1afe4/1596036505",
"tags": ["Some tag", "Some other tag"],
"description": "Very Important",
"createdTime": "2010-01-13T23:08:06+0000",
"activitiesCount": {
"0": 0,
"1": 0,
"2": 0,
"-1": 1
},
"status": 0,
"confidence": 31,
"completion": 77,
"urgency": "10",
"isOverdue": false,
"channels" [ "paid-search", "email" ]
"dueTime": "2010-01-03T15:00:00+0000",
"nextStepDueTime": "2010-07-15T12:00:00+0000",
"value": {
"currency": "USD",
"amount": 26365
},
"normalizedValue": {
"currency": "USD",
"amount": 26365
},
"lastContactedDate": null,
"deletedTime": "2010-09-28T13:30:00+0000",
"priority": 1
}
The activitiesCount field represents the number of activities associated with the lead. It is indexed by activity statuses.
0 = STATUS_SCHEDULED
1 = STATUS_LOGGED
2 = STATUS_CANCELLED
-1 = STATUS_OVERDUE (note: STATUS_OVERDUE implies STATUS_SCHEDULED)
So, for example, activitiesCount["-1"]
is the number of overdue activities associated with the lead.
The nextStepDueTime field is used by Nutshell to determine whether the lead is overdue (and therefore what color the lead's pie chart should be).
The name field is a unique string identifying the lead to users on the Nutshell website. The number contained in this string is not necessarily the same as the lead ID, which is invisible to users. Use the Core::findLeads() method with the "number" query parameter to retrieve the lead corresponding to a name.
- See also
- Process::_renderStub for output for process stubs
- Returns
- array
◆ _renderStub()
Renders a lead stub.
{
"stub": true,
"id": 145,
"entityType": "Leads",
"rev": "5",
"name": "Lead–12",
"status": 10,
"completion": 100,
"value": {
"currency": "USD",
"amount": 1780
},
"primaryAccountName": "Auto-Owners Insurance",
"primaryContactName": "Joe Smith",
"dueTime": "2010-07-18T12:00:00+0000",
"isOverdue": true,
"nextStepDueTime": "2010-07-15T12:00:00+0000",
"closedTime": "2010-07-18T12:00:00+0000"
}
- Returns
- array
Renders a milestone.
Definition: Milestone.php:5
Renders a mapping between a lead and account.
Definition: AccountMap.php:5
Renders a stageset.
Definition: Stageset.php:5
Renders a market.
Definition: Market.php:5
Renders a mapping between a lead and a product.
Definition: ProductMap.php:5
Renders a mapping between a lead and a source.
Definition: SourceMap.php:5
Renders a note.
Definition: Note.php:5
Renders a process.
Definition: Process.php:5
Renders a mapping between a lead and a competitor.
Definition: CompetitorMap.php:5
Renders a user.
Definition: User.php:5
Renders an account.
Definition: Account.php:5