Saltar al contendio prinicipal

Properties (Elements) Data Model

Advertencia

Esta página aún no se encuentra traducida al español.

COTProperty

Description

Properties (also known as _elements) are like the rows of a database table, but much more. Properties are contained within property types (collections).

Properties are used to establish a relationship or define something. That's why you can use them sometimes as a resource and others as an asset. For example, you can send a specific text to all the users that have the "Special Message" property. Since each user is simply a collection or property type, you can add properties to them.

Additionally, workflows use properties to define their states.

As you can see, the versatility of properties is quite significant.

Properties can also contain extra information through additional fields set by their property type.

JSON Sample

Property with additional fields:

{
"__v": 0,
"_id": "6185cfd61cdf6b755245e18d",
"company": "6185d0ddd7b7517c8e0fb40b",
"createdAt": "2021-05-27T15:20:26.487Z",
"isActive": true,
"modifiedAt": "2021-11-04T16:31:03.967Z",
"name": {
"code": "ford_mustang",
"display": "Ford Mustang"
},
"propertyType": "car_model_00",
"subproperty": [
"6185cfe1ef46d0aee4c2b653",
"6185cfe8b420610501b280d8"
],
"search": [
"ford",
"00",
"ford00"
],
"schemaInstance": {
"origin": "USA",
"year": "1969",
"color": "black",
"car_picture": "6185d0e7c6f325c5ecb1ce3d"
}
}

Property associated with a user:

    {
"__v": 0,
"_id": "6185cbe62b21d41b5744e27e",
"company": "6185cdd32b0e783a0fbef35a",
"createdAt": "2021-08-16T16:04:16.843Z",
"isActive": true,
"modifiedAt": "2021-10-26T10:16:47.891Z",
"name": {
"code": "user_6185cbfc457214abaed8019f_6185cbe62b21d41b5744e27e",
"display": "jane@company.com"
},
"owner": {
"$ref": "users",
"$id": "6185cbfc457214abaed8019f",
"$db": ""
},
"propertyType": "birthdays_00",
"search": [
"jane",
"company",
"com",
"user",
"6185cbfc457214abaed8019f",
"6185cbe62b21d41b5744e27e",
"janecompanycom",
"user6185cbfc457214abaed8019f6185cbe62b21d41b5744e27e"
],
"schemaInstance": {
"birthdate_00": "1985-06-01T04:00:00.000Z"
},
"subproperty": [],
}

Fields

FieldDescriptionTypeNote
_idSystem generated property ID.ObjectId<COTProperty>
companyThe ID of the company the property is found in.ObjectId<COTCompany>
createdAtIndicates when the property was created.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
isActiveIndicates if the property is active or not.boolean
modifiedAtIndicates the last time the property's configuration was modified.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
nameName settings.object
name.codeThe property's identification code.stringMaximum 60 characters; only lowercase letters, numbers, and underscores allowed; must be unique.
name.displayThe property's displayed name.string
ownerReferences a task or user that ownes or uses the property as an additional field value.object
owner.$dbContains database information regarding the referenced owner.string
owner.$idContains the ObjectId of the referenced owner, i.e., task or user.ObjectIdFor example,ObjectId<COTTask> or ObjectId<COTUser>, accordingly.
owner.$refContains the reference type.stringFor example, "users" when a user is associated with the element. If the property is related to a task, a generated string is used, e.g., "task-{COTCompany.subdomain}-{COTTaskGroup.collectionName}"
propertyTypeThe code of the COTPropertyType associated with the property.string
schemaInstanceContains additional field data.objectThe general format is property.schemaInstance = { [field]: data-type }.
COTPropertyType's schemaNodes[x].key defines the field and schemaNodes[x].basicType defines the data type.
searchSystem search keywords.string[ ]Do not modify.
subpropertyContains child elements.string[ ]

Deprecated

FieldDescriptionTypeNote
extraAdditional attributes that consist of any name and value. Format: {"name":"value"}objectDEPRECATED
geoLocalization attributes.objectDEPRECATED
geo.geometryobjectDEPRECATED
geo.propertiesobjectDEPRECATED
geo.properties.addressstringDEPRECATED
geo.properties.citystringDEPRECATED
geo.properties.countrystringDEPRECATED
geo.properties.phonestringDEPRECATED
geo.properties.phoneFormattedstringDEPRECATED
geo.properties.postalCodestringDEPRECATED
geo.properties.regionstringDEPRECATED
geo.properties.statestringDEPRECATED
geo.typestringDEPRECATED
name.subDisplaySubtitlestringDEPRECATED
sextrastringDEPRECATED
skipCodeValidationWARNING: Do not set, disables many features. Deprecated, but still in use with some legacy settings.booleanDEPRECATED
superPropertyDisplays parent property data model.COTPropertyDEPRECATED
superPropertiesDisplays list of parent property data models.COTProperty[ ]DEPRECATED
usersstring[ ]DEPRECATED

Additional Resources

Help