State Changing Methods

Knowledge Center > Zuora CPQ > Zuora CPQ Development Resources > Zuora CPQ Component Library > Zuora CPQ Global Classes > CPQ X API > CPQ X Models > QPlan Class > State Changing Methods

State Changing Methods

Table of contents
No headers

This functionality is in Limited Availability. We are actively soliciting feedback from a small set of early adopters.

The remove() and revert() methods are used to change the current state of a plan. Behavior differs depending on the current amendment type.

Updating most values on a plan, charge, or tier can trigger an Update Event that can also change the state of a plan.

All successful calls will enable the isChanged flag.

In the table "On Save" means that the QPlanWriter.save() is called. See QPlanWriter Class for more information.

Original Amendment Type Action Effect On Save
NewProduct (Saved) remove() voidAction flagged. Delete NewProduct Amendment.
revert() voidAction flagged. Delete NewProduct Amendment.
update event No type change.

Update NewProduct Amendment.

NewProduct (Unsaved) No change. N/A Create NewProduct Amendment.
remove() voidAction flagged. No change.
revert() voidAction flagged. No change.
update event No type change. Create NewProduct Amendment.
OriginalProduct remove() Amendment Type changed to RemoveProduct. Create RemoveProduct Amendment.
revert() Invalid Operation Exception thrown. N/A
update event

Amendment Type changed to UpdateProduct.

Cloned original state stored in originalPlan field.

Create UpdateProduct Amendment.
UpdateProduct (Saved) remove()

Amendment Type changed to RemoveProduct.

voidAction is disabled.

Update UpdateProduct Amendment to RemoveProduct.
revert()

Plan data reverted to match originalPlan.

AmendmentType changed to OriginalProduct.

voidAction flagged.

Delete UpdateProduct Amendment.
update event

No type change.

voidAction is disabled.

Update UpdateProduct Amendment.
UpdateProduct (Unsaved) No change. N/A Create UpdateProduct Amendment.
remove() Amendment Type changed to RemoveProduct. Create RemoveProduct Amendment.
revert()

Plan data reverted to match originalPlan.

AmendmentType changed to OriginalProduct.

No change.
update event

No type change.

voidAction is disabled.

Update UpdateProduct Amendment.
RemoveProduct (Saved) remove() Invalid Operation Exception thrown. N/A
revert()

Plan data reverted to match originalPlan.

AmendmentType changed to OriginalProduct.

voidAction flagged.

Delete RemoveProduct Amendment.
update event Invalid Operation Exception thrown. N/A
RemoveProduct (Unsaved) No change. N/A Create RemoveProduct Amendment.
remove() Invalid Operation Exception thrown. N/A
revert() Amendment Type updated to OriginalProduct. No change.
update event Invalid Operation Exception thrown. N/A
Last modified

Tags

This page has no custom tags.

Classifications

(not set)