A single entry in the activity timeline of a lead, such as a phone call, an email or a typed note. Each note records the kind of contact in its action type, whether it came from the customer or went to them, and optionally free text. A note is always filed against an admin organisation and normally against the person or organisation it concerns, and it may additionally point at the lead and the task it arose from, so the same note shows up on the lead timeline, the task and the profile. The display helpers on the class turn the action type into the icon and heading used by the timeline.
Group: Database Entities
Implements: Serializable, Relational
Properties
| Property | Returns | Description |
|---|---|---|
| actionType | String | What kind of contact this note records, as a lower case keyword such as "phone", "email", "sms" or "note". It drives the timeline icon and heading, and any unrecognised value is shown as it stands. Can be null. |
| adminDomain | Organisation | The admin organisation, or tenant, which owns this note. All of the finders are scoped to it. |
| createDate | Date | When this note was recorded. The timeline is ordered by it, newest first. Never null. |
| createdBy | Profile | The team member who recorded this note. Null when the note was created by the system rather than by a person. |
| fullSummary | String | Human readable description of the note. Returns the note text when there is any, otherwise builds a sentence from the action type and direction, such as "phone from Jane Smith", falling back to "the customer" when the note is not linked to a profile. |
| icon | String | Name of the icon the timeline shows for this note, derived from the action type. Email, phone, enabled, disabled and removed have their own icons, a note with no action type uses "pencil", and any other action type is returned unchanged as the icon name. |
| id | long | Unique database identifier for this note. |
| inbound | boolean | Direction of the contact. True when it came from the customer, for example a call they made, and false when the team contacted the customer. |
| notes | String | The free text of the note, up to 20,000 characters. Often empty for an automatically logged action, in which case the summary is built from the action type instead. |
| relatedLead | Lead | The lead this note was recorded against, if any. Notes created directly against a profile or an organisation have no lead, so this can be null. |
| relatedProfile | BaseEntity | Who the note is about. Usually the customer's profile, but it holds an organisation instead when the lead is for an organisation rather than a person, so it is typed as a base entity. Can be null. |
| relatedTask | Task | The task this note arose from, if any, for example the call task an agent was working when they logged the call. Can be null. |
| summary | String | Short description of the note for display in a list. It currently returns the full summary unchanged, so it is not truncated. |
| timelineTitle | String | Heading the timeline shows for this note, worked out from the action type and direction, for example "Call from customer" or "Emailed customer". A note with no action type is titled "Note", and an unrecognised action type is used as the heading unchanged. |
Methods
getId() · setId(long id) · getAdminDomain() · setAdminDomain(Organisation adminDomain) · getCreateDate() · setCreateDate(Date createDate) · getRelatedLead() · setRelatedLead(Lead relatedLead) · getRelatedProfile() · setRelatedProfile(BaseEntity relatedProfile) · getCreatedBy() · setCreatedBy(Profile createdBy) · getRelatedTask() · setRelatedTask(Task relatedTask) · getNotes() · setNotes(String notes) · isInbound() · setInbound(boolean inbound) · getActionType() · setActionType(String actionType) · getSummary() · getFullSummary() · getIcon() · getTimelineTitle()
getId()
Returns: long
Unique database identifier for this note.
setId(long id)
Returns: void
Sets the database identifier. The database assigns this when the note is first saved, so it is not normally set by hand.
| Parameter | Description |
|---|---|
id | the primary key to use |
getAdminDomain()
Returns: Organisation
The admin organisation, or tenant, which owns this note. All of the finders are scoped to it.
setAdminDomain(Organisation adminDomain)
Returns: void
Sets the admin organisation which owns this note.
| Parameter | Description |
|---|---|
adminDomain | the owning admin organisation |
getCreateDate()
Returns: Date
When this note was recorded. The timeline is ordered by it, newest first. Never null.
setCreateDate(Date createDate)
Returns: void
Sets the timestamp the note was recorded.
| Parameter | Description |
|---|---|
createDate | when the note was recorded |
getRelatedLead()
Returns: Lead
The lead this note was recorded against, if any. Notes created directly against a profile or an organisation have no lead, so this can be null.
setRelatedLead(Lead relatedLead)
Returns: void
Sets the lead this note is recorded against.
| Parameter | Description |
|---|---|
relatedLead | the related lead, or null for a note not attached to a lead |
getRelatedProfile()
Returns: BaseEntity
Who the note is about. Usually the customer's profile, but it holds an organisation instead when the lead is for an organisation rather than a person, so it is typed as a base entity. Can be null.
setRelatedProfile(BaseEntity relatedProfile)
Returns: void
Sets who the note is about, either a profile or an organisation.
| Parameter | Description |
|---|---|
relatedProfile | the profile or organisation the note concerns |
getCreatedBy()
Returns: Profile
The team member who recorded this note. Null when the note was created by the system rather than by a person.
setCreatedBy(Profile createdBy)
Returns: void
Sets the profile recorded as having created this note.
| Parameter | Description |
|---|---|
createdBy | the profile which recorded the note |
getRelatedTask()
Returns: Task
The task this note arose from, if any, for example the call task an agent was working when they logged the call. Can be null.
setRelatedTask(Task relatedTask)
Returns: void
Sets the task this note arose from.
| Parameter | Description |
|---|---|
relatedTask | the related task, or null if the note did not come from a task |
getNotes()
Returns: String
The free text of the note, up to 20,000 characters. Often empty for an automatically logged action, in which case the summary is built from the action type instead.
setNotes(String notes)
Returns: void
Sets the free text of the note.
| Parameter | Description |
|---|---|
notes | the note text |
isInbound()
Returns: boolean
Direction of the contact. True when it came from the customer, for example a call they made, and false when the team contacted the customer.
setInbound(boolean inbound)
Returns: void
Sets the direction of the contact.
| Parameter | Description |
|---|---|
inbound | true if the contact came from the customer, false if it went to them |
getActionType()
Returns: String
What kind of contact this note records, as a lower case keyword such as "phone", "email", "sms" or "note". It drives the timeline icon and heading, and any unrecognised value is shown as it stands. Can be null.
setActionType(String actionType)
Returns: void
Sets the kind of contact this note records.
| Parameter | Description |
|---|---|
actionType | the action type keyword, for example "phone" or "email" |
getSummary()
Returns: String
Short description of the note for display in a list. It currently returns the full summary unchanged, so it is not truncated.
getFullSummary()
Returns: String
Human readable description of the note. Returns the note text when there is any, otherwise builds a sentence from the action type and direction, such as "phone from Jane Smith", falling back to "the customer" when the note is not linked to a profile.
getIcon()
Returns: String
Name of the icon the timeline shows for this note, derived from the action type. Email, phone, enabled, disabled and removed have their own icons, a note with no action type uses "pencil", and any other action type is returned unchanged as the icon name.
getTimelineTitle()
Returns: String
Heading the timeline shows for this note, worked out from the action type and direction, for example "Call from customer" or "Emailed customer". A note with no action type is titled "Note", and an unrecognised action type is used as the heading unchanged.