Contact

Contents

General
CloudAssessSpec
CollegePreferenceService
CsvBuilder
DocumentService
DocumentSpec
EmailSpec
ExportSpec
MailchimpSpec
Mask
Money
Preferences
QualityResultSpec
ReportSpec
SmsSpec
SystemUserService
Database objects
ACLAccessKey
ACLRole
Account
AccountTransaction
Application
Article
ArticleProduct
Assessment
AssessmentClass
AssessmentSubmission
AttachmentData
Attendance
Banking
Certificate
ClassCost
ConcessionType
Contact
ContactRelation
ContactRelationType
CorporatePass
CorporatePassCourseClass
CorporatePassProduct
Country
Course
CourseClass
CourseClassTutor
CourseModule
CustomField
CustomFieldType
DefinedTutorRole
Discount
DiscountConcessionType
DiscountCourseClass
DiscountMembership
DiscountMembershipRelationType
Document
DocumentVersion
EmailTemplate
Enrolment
EntityRelation
ExportTemplate
Field
FieldConfiguration
FieldConfigurationScheme
FieldHeading
FundingSource
FundingUpload
FundingUploadOutcome
Import
Invoice
InvoiceDueDate
InvoiceLine
InvoiceLineDiscount
Language
Membership
MembershipProduct
Message
MessagePerson
Module
Note
Outcome
PayLine
PayRate
PaymentIn
PaymentInLine
PaymentMethod
PaymentOut
PaymentOutLine
Payslip
Preference
PriorLearning
Product
ProductItem
Qualification
Report
ReportOverlay
Room
SavedFind
Script
Session
SessionModule
Site
Student
StudentConcession
Survey
SystemUser
Tag
TagRelation
TagRequirement
Tax
TrainingPackage
Tutor
TutorAttendance
UnavailableRule
Voucher
VoucherPaymentIn
VoucherProduct
WaitingList
Enumerations
AccountTransactionType
AccountType
ApplicationStatus
AttachmentInfoVisibility
AttachmentSpecialType
AttendanceType
AvetmissStudentDisabilityType
AvetmissStudentEnglishProficiency
AvetmissStudentIndigenousStatus
AvetmissStudentLabourStatus
AvetmissStudentPriorEducation
AvetmissStudentSchoolLevel
ClassCostFlowType
ClassCostRepetitionType
ClassFundingSource
ClientIndustryEmploymentType
ClientOccupationIdentifierType
ConfirmationStatus
ContactDuplicateStatus
CourseClassAttendanceType
CourseEnrolmentType
CreditCardType
CreditLevel
CreditProviderType
CreditType
DeliveryMode
DeliverySchedule
DiscountType
EnrolmentStatus
EnrolmentVETFeeHelpStatus
EntityRelationType
ExpiryType
FieldConfigurationType
InvoiceType
KeyCode
KeyCollision
MessageStatus
MessageType
MoneyRounding
NodeSpecialType
OutcomeStatus
PaymentSource
PaymentStatus
PaymentType
PayslipStatus
PostcodeType
ProductStatus
ProductType
QualificationType
RecognitionOfPriorLearningIndicator
StudentCitizenship
StudentStatusForUnitOfStudy
StudyReason
SurveyTypeSource
SurveyVisibility
TriggerType
UsiStatus
VETFeeExemptionType
VoucherPaymentStatus

Contacts are at the heart of onCourse. A Contact might be an individual or a company. Contacts can be extended by Student or Tutor classes, however a Contact can also exist on its own.

 
        public 
        Contact
     {
}

Instance methods

addTag(tag)

Add a tag to this object. If the tag requirements don't allow this tag to be added, then this method does nothing and returns false.

Tag tag

the tag you want to add

Returns boolean

true if the tag is found and added

addTag(path)

Add a tag to this object. You need to pass the full path to the tag, for example "Subjects/Arts/Painting". If the tag requirements don't allow this tag to be added, then this method does nothing and returns false.

String path

the full path to the tag

Returns boolean

true if the tag is found and added

attachDocument(doc)

Attachhes a document to this contact.

Document doc

the Document to be attached

Returns def

Documentation not yet available

customField(fieldName)

Retrieves specific custom field value for this contact.

String fieldName

name or key of the custom field

Returns Nullable String

custom field value for current contact or null if there is no such custom field

abn

Returns Nullable String

ABN (Australian Business Number) mostly for companies, but tutors might also have one for payment

address

Returns Not null String

address details concatenated together: suburb, state, postcode with line breaks as appropriate

address

A simple convenience function to assemble the address in a formatted block.

Street
Suburb State Postcode

Returns String

address concatenated from street, suburb, state and postcode fields

age

Get the age in whole years

Returns Integer

the contact's age

allowEmail

Returns Not null Boolean

whether the contact opted into email marketing

allowPost

Returns Not null Boolean

whether the contact opted into postal (mail) marketing

allowSms

Returns Not null Boolean

whether the contact opted into SMS marketing

birthDate

Returns Nullable LocalDate

yep, the contact's date of birth as LocalDate

classCosts

Returns Not null List<ClassCost>

ClassCost records associated with this contact

concessionsAuthorised

Returns Not null List<StudentConcession>

list of concessions authorised by this contact

corporatePasses

Returns Not null List<CorporatePass>

CorporatePass records associated with this contact

country

Some validation rules (such as postcode) only apply if this country is "Australia"

Returns Not null Country

the country for the address of this contact

createdOn

Returns Nullable Date

the date and time this record was created

customFields

Look at the CustomFieldType records in order to help interpret what you get here.

Returns Not null List<ContactCustomField>

all the custom field data for this contact

dateOfBirth

Returns Date

the contact's date of birth as Date

deliveryStatusEmail

reaches 6 onCourse considers emails to this contact undeliverable

Returns Not null Integer

number of failed consecutive attempts to deliver email to this contact, when this value

deliveryStatusPost

6 means that postage is undeliverable

Returns Not null Integer

number which shows if postal messages can be delivered to this contact, 0 means messages can be delivered,

deliveryStatusSms

reaches 6 onCourse considers messages to this contact undeliverable

Returns Not null Integer

number of failed consecutive attempts to deliver SMS message to this contact, when this value

documents

Returns Not null List<Document>

The list of attached documents

email

Returns Nullable String

the contact's main email address

fax

Returns Nullable String

facsimile number (do we still use those?)

firstName

Returns Nullable String

first name, null for companies

fromContacts

Returns Not null List<ContactRelation>

contact records which have relationship to this contact

fullName

Returns Nullable String

the full name for this contact including the middle name, or just the name of the company

homePhone

Returns Nullable String

home phone number, formatted just how it was entered in the UI

honorific

Returns Nullable String

the honorific is the bit before the name (eg. Dr, Mrs, The Honorable)

invoiceTerms

When an invoice is created in Quick Enrol, or as a manual invoice, use value from the contact to set the due date. This date can still be changed during creation to another date by the user. Picks up the default preference value if it isn't overridden by the contact.

Returns Nullable Integer

invoice terms

invoices

Remember that a contact's invoices don't necessarily represent what they enrolled in. A contact might be billed for someone else's enrolments or other purchases.

Returns Not null List<Invoice>

all the invoices linked to this contact, including those already paid

isCompany

Returns Not null Boolean

true if this contact is a company

isMale

Returns Nullable Boolean

true if this contact is male

lastName

Returns String

last name of this contact

memberships

Returns Not null List<Membership>

all the memberships (including expired) subscribed to by this contact

message

Returns Nullable String

message (alert for operator) associated with this contact

messages

Returns Not null List<MessagePerson>

list of all MessagePerson records which were sent to this contact

middleName

Returns String

middle name

mobilePhone

Returns Nullable String

contact's mobile phone

modifiedOn

Returns Date

the date and time this record was modified

name

Convenience method, same as getName(false)

Returns Nullable String

contact name in a format it is most commonly used in reports: 'Smith, John'

getName(firstNameFirst)

A method for returning a formatted contact name. See also fullName() if you want the middle name as well. This method works for companies.

boolean firstNameFirst

- true for "John Smith", false for "Smith, John"

Returns Nullable String

formatted name

notes

Returns String

concatenated notes

owingInvoices

Returns Not null List<Invoice>

invoices that belong to contact which have positive amount owing value

payments

Returns Not null List<PaymentInterface>

all payment in and payment out records linked to this contact

paymentsIn

Returns Not null List<PaymentIn>

all PaymentIn records associated with this contact

paymentsOut

Returns Not null List<PaymentOut>

all PaymentOut records associated with this contact

payslips

Returns Not null List<Payslip>

all Payslip records associated with this contact

getPortalLink(target, timeout)

Generates signed URL granting access to specific page in portal. For example following statement restrictedPortalURL(courseClass, '2016-01-11') if executed on 1 Jan 2016 will yield the following URL: https://www.skillsoncourse.com.au/portal/class/1531?valid=20160111&key=k9_S8uk68W5PoCvq5lSUp70sqQY Target - the specific object on the basis of which url to certain portal page will be assembled. Available objects are: courseClass - link to class page enrolment - link to class page invoice - link to one invoice details document - link to download file directly "USI" string - link to USI details entering page in portal "someOtherPagePath" string - link to page defined by customer (for example: 'timetable', 'results', 'resources', 'subscriptions' and other) Timeout - acceptable for different parameter types: java.util.Date - date after which URL will expire and no longer be valid, java.lang.String - string representation of date (format is 'yyyy-MM-dd') after which URL will expire and no longer be valid, java.lang.Integer - number of days after which URL will expire and no longer be valid. If timeout == null or not defined then url link will be valid for 7 days.

def target

Documentation not yet available

def timeout

Documentation not yet available

Returns def

signed portal url to certain page (target)

portalLoginURL

Generates URL to portal login page. /

Returns String

portal login page URL

postcode

Returns Nullable String

contact's postcode

productItems

Returns Not null List<ProductItem>

all ProductItem records associated with this contact

state

Returns Nullable String

contact's state

getStatementLines(from, to)

For this contact, find all the statement lines (invoices, credit notes, payments) and then filter them between the date range.

LocalDate from

the start datetime to find lines

LocalDate to

the end datetime

Returns List<PrintableStatementLine>

a list of all statement lines, not sorted

street

Returns Nullable String

contact's address

student

Returns Nullable Student

Student record associated with this contact

suburb

Returns Nullable String

contact's suburb

tags

Returns Not null List<Tag>

The list of tags assigned to this contact

tags

Get all tags related to this object.

Returns List<Tag>

List of related tags

tfn

Returns Nullable String

contact's TFN (Tax File Number)

title

Returns Nullable String

contact's title

toContacts

Returns Not null List<ContactRelation>

contact records which this are related from this contact

totalOwing

Returns Money

total of all owing amounts for this contact, regardless of due date or payment plan

tutor

Returns Nullable Tutor

Tutor record associated with this contact

uniqueCode

Returns Not null String

alphanumeric 16 character unique code associated with this contact

workPhone

Returns Nullable String

contact's work phone

hasTag(path)

Check to see whether this object has this tag. Either pass the name of a tag (for example "Painting") or the full path to the tag, for example "Subjects/Arts/Painting".

String path

the tag name or the full path to the tag

Returns boolean

true if the tag is found and is attached to this object

hasTag(path, isSearchWithChildren)

Check to see whether this object has this tag or it's child tag. Either pass the name of a tag (for example "Painting") or the full path to the tag, for example "Subjects/Arts/Painting".

String path

the tag name or the full path to the tag

boolean isSearchWithChildren

flag to define whether need to find in children tags or not

Returns boolean

true if the tag or it's children is found and is attached to this object

removeTag(tag)

Remove a tag from this object. If the tag isn't already attached, this method does nothing and returns false.

Tag tag

the tag you want to remove

Returns boolean

true if the tag was found and removed

removeTag(path)

Remove a tag from this object. You need to pass the full path to the tag, for example "Subjects/Arts/Painting". If the tag isn't already attached, this method does nothing and returns false.

String path

the full path to the tag

Returns boolean

true if the tag was found and removed