Show the details of a 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 | Read-only Non-null |
title | string | Title of the related entity, e.g. their job title (max 128 characters) | Read-Write Nullable Searchable |
department | string | Department (max 128 characters). Only allowed on roles between a contact and a company | Read-Write Nullable Searchable |
contact | reference | The URL of the Contact | Read-Write Nullable Searchable |
company | reference | The URL of the Company | Read-Write Nullable Searchable |
opportunity | reference | The URL of the Opportunity | Read-Write Nullable Searchable |
project | reference | The URL of the Project | Read-Write Nullable Searchable |
type | reference | The URL of the Role Type | Read-Write Nullable Searchable |
role | string | Name of the role type. To change it, set type | Read-only Nullable |
create_date | datetime | When the role was created | Read-only Non-null |
trashed | boolean | Whether the role is in the trash. Set to false to restore it | Read-only Non-null |
DepartmentThe
departmentattribute is only applicable to roles between Contact and Company entities.
A role links two records. The first role created for a contact becomes the contact's default role. Roles in the trash are not shown on the records they link.
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.