List a specific role
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
One of Daylite's most powerful features is the relating of objects to one another. These relationships exist in the form of roles. Roles are intermediate objects which represent and store context about the relationships between major objects.
Attributes
| Attribute Name | Type | Description | Attributes |
|---|---|---|---|
self | reference | The URL of the Role | |
title | string | The title of the related entity, as defined by the related entity (i.e. their job title). | Read-Write Nullable |
department | string | The name of the department for the role. | Read-Write Nullable |
contact | reference | The URL of the Contact | Read-Write Nullable |
company | reference | The URL of the Company | Read-Write Nullable |
opportunity | reference | The URL of the Opportunity | Read-Write Nullable |
project | reference | The URL of the Project | Read-Write Nullable |
role | string | The role of the related entity, as defined by the user. | Read-Write Non-null |
type | reference | The URL of the Role Type | Read-Write Non-null |
create_date | datetime | Date the Role was created | Read-only Non-null |
trashed | boolean | Is the item in the trash | Read-Write Non-null |
DepartmentThe
departmentattribute is only applicable to roles between Contact and Company entities.
The following table outlines the ways in which the various objects may be related to one another using roles.
| Entity | Relatable To |
|---|---|
| Contact | Company, Opportunity, Project |
| Company | Contact, Opportunity, Project |
| Opportunity | Company, Contact |
| Project | Company, Contact |
Role instances are described on major objects as collections of related major objects. In the following example, a role is configured to relate one contact to two companies.
{
"self": "/v1/contacts/1000",
"first_name": "Stephanie",
"companies": [
{
"title": "Interim CEO",
"role": "Decision Maker",
"department": "Executive",
"company": "/v1/companies/1000"
},
{
"role": "Advisor",
"department": "The Board",
"company": "/v1/companies/2000"
}
]
}As can be seen in the above example, roles between objects are established by providing collections of existing object references and associated fields, grouped by related object type. The inverse of the role shown above might appear as follows.
[
{
"self": "/v1/companies/1000",
"name": "Rottweiler Food Corp.",
"contacts": [
{
"title": "Interim CEO",
"role": "Decision Maker",
"department": "Executive",
"contact": "/v1/contacts/1000"
}
]
},
{
"self": "/v1/companies/2000",
"name": "Poodle Groomers Inc.",
"contacts": [
{
"role": "Advisor",
"department": "The Board",
"contact": "/v1/contacts/1000"
}
]
}
]
Role KeysEach relatable entity has a separate collection for roles (i.e.
"contacts","companies","opportunities","projects"). Note that the collection uses the plural form of the entity name as the object key, while the role itself uses the singular form of the entity name.