Groups the quotes offered to a customer for one piece of business, and records which of them was accepted. A proposal is usually raised from a lead, in which case the new proposal's id is written back onto the lead as the field proposalId, but it can also be raised directly against a customer. It starts in status CREATED and moves to ACCEPTED once one of its quotes is taken up.

Group: Database Entities

Implements: Serializable, Relational


Properties

PropertyReturnsDescription
acceptedQuoteQuoteThe one quote the customer accepted, if any. Null while the proposal is still being negotiated.
customerBaseEntityWho the proposal is for. This is a base entity, so it may be an individual profile or an organisation such as a dealer or reseller. Required.
descriptionStringA one line summary of the proposal, listing each quote as its title followed by an at sign and the quote total, separated by commas. Includes deleted quotes, and fails with a null pointer error if no quotes have been added yet.
idlongThe database identifier of this proposal. This is the value written onto the originating lead as its proposalId field.
leadLeadThe lead this proposal was raised from, if any. Null for a proposal created directly against a customer rather than through a journey.
quotesList<Quote>Every quote offered under this proposal, including ones that have since been deleted or rejected. Null until the first quote is added.
quotesValidbooleanTrue if every live quote on this proposal has at least one line item, which is the check made before a proposal can be sent. Deleted quotes are ignored, and this fails with a null pointer error if no quotes have been added yet.
statusProposalStatusWhere the proposal has got to, either CREATED for one still being negotiated or ACCEPTED once a quote has been taken up. Required.

Methods

getLead() · setLead(Lead lead) · getId() · setOrganisation(Organisation organisation) · getQuotes() · setQuotes(List<Quote> quotes) · getAcceptedQuote() · setAcceptedQuote(Quote acceptedQuote) · getStatus() · setStatus(ProposalStatus status) · getCustomer() · setCustomer(BaseEntity customer) · getDescription() · quote(long acceptedQuoteId) · isQuotesValid() · containsQuote(Quote quote)

getLead()

Returns: Lead

The lead this proposal was raised from, if any. Null for a proposal created directly against a customer rather than through a journey.

setLead(Lead lead)

Returns: void

Sets the lead this proposal was raised from.

ParameterDescription
leadthe originating lead, or null for none

getId()

Returns: long

The database identifier of this proposal. This is the value written onto the originating lead as its proposalId field.

setOrganisation(Organisation organisation)

Returns: void

Sets the organisation that owns this proposal.

ParameterDescription
organisationthe owning organisation

getQuotes()

Returns: List<Quote>

Every quote offered under this proposal, including ones that have since been deleted or rejected. Null until the first quote is added.

setQuotes(List<Quote> quotes)

Returns: void

Replaces the list of quotes belonging to this proposal.

ParameterDescription
quotesthe quotes belonging to this proposal

getAcceptedQuote()

Returns: Quote

The one quote the customer accepted, if any. Null while the proposal is still being negotiated.

setAcceptedQuote(Quote acceptedQuote)

Returns: void

Sets the quote the customer accepted.

ParameterDescription
acceptedQuotethe accepted quote, or null to clear it

getStatus()

Returns: ProposalStatus

Where the proposal has got to, either CREATED for one still being negotiated or ACCEPTED once a quote has been taken up. Required.

setStatus(ProposalStatus status)

Returns: void

Sets where the proposal has got to.

ParameterDescription
statusthe new proposal status

getCustomer()

Returns: BaseEntity

Who the proposal is for. This is a base entity, so it may be an individual profile or an organisation such as a dealer or reseller. Required.

setCustomer(BaseEntity customer)

Returns: void

Sets who the proposal is for.

ParameterDescription
customerthe customer this proposal is addressed to

getDescription()

Returns: String

A one line summary of the proposal, listing each quote as its title followed by an at sign and the quote total, separated by commas. Includes deleted quotes, and fails with a null pointer error if no quotes have been added yet.

quote(long acceptedQuoteId)

Returns: Quote

Finds one of this proposal's quotes by its id, ignoring quotes that have been deleted. The already loaded collection is scanned rather than the database.

ParameterDescription
acceptedQuoteIdthe id of the quote to find

isQuotesValid()

Returns: boolean

True if every live quote on this proposal has at least one line item, which is the check made before a proposal can be sent. Deleted quotes are ignored, and this fails with a null pointer error if no quotes have been added yet.

containsQuote(Quote quote)

Returns: boolean

True if the given quote belongs to this proposal, compared by id. Deleted quotes still count as belonging.

ParameterDescription
quotethe quote to look for
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.