Interface: WorkflowManager
Properties
addConfirmCallback
addConfirmCallback: (
callback) =>void
Parameters
callback
ConfirmCallback
Returns
void
addEditedCallback
addEditedCallback: (
callback) =>void
Parameters
callback
EditedCallback
Returns
void
addElementsCallback
addElementsCallback: (
callback) =>void
Parameters
callback
ElementsCallback
Returns
void
addInformationResultCallback
addInformationResultCallback: (
callback) =>void
Parameters
callback
InformationResultCallback
Returns
void
addInitCallback
addInitCallback: (
callback) =>void
Parameters
callback
InitCallback
Returns
void
addMakingAdjustmentsCallback
addMakingAdjustmentsCallback: (
callback) =>void
Parameters
callback
MakingAdjustmentsCallback
Returns
void
addMandatoryCallback
addMandatoryCallback: (
callback) =>void
Parameters
callback
MandatoryCallback
Returns
void
addMetadataCallback
addMetadataCallback: (
callback) =>void
Parameters
callback
MetadataCallback
Returns
void
addPoller
addPoller: (
poller) =>void
Parameters
poller
Poller
Returns
void
addRecipientCallback
addRecipientCallback: (
callback) =>void
Parameters
callback
RecipientCallback
Returns
void
addSelectionCallback
addSelectionCallback: (
callback) =>void
Parameters
callback
SelectionCallback
Returns
void
addStepSpecificStorageCallback
addStepSpecificStorageCallback: (
callback,stepName) =>void
Parameters
callback
StepSpecificStorageCallback
stepName
string
Returns
void
addStorageCallback
addStorageCallback: (
callback) =>void
Parameters
callback
StorageCallback
Returns
void
addValidationCallback
addValidationCallback: (
callback) =>void
Parameters
callback
ValidationCallback
Returns
void
getAllLayoutData
getAllLayoutData: () =>
LayoutState[]
Returns
getCommandContext
getCommandContext: () =>
CommandContext
Returns
getCommandDispatcher
getCommandDispatcher: () => (
command) =>void
Returns
(command) => void
getInitializationPromise
getInitializationPromise: () =>
Promise<void>
A promise resolving when the initial state of the workflow has completed loading.
Returns
Promise<void>
getLayoutPreviewService
getLayoutPreviewService: () =>
LayoutPreviewService|undefined
Returns
LayoutPreviewService | undefined
getLayouts
getLayouts: () =>
ILayout[]
Returns
ILayout[]
getMandatoryUnfulfilledSteps
getMandatoryUnfulfilledSteps: () =>
Promise<string[]>
Returns
Promise<string[]>
getMetadata
getMetadata: (
stepName) =>StepMetadata|undefined
Parameters
stepName
string
Returns
StepMetadata | undefined
getModelContainer
getModelContainer: () =>
ModelContainer|undefined
Returns
ModelContainer | undefined
getModelSlotsForAttachments
getModelSlotsForAttachments: (
parent,assetKey) =>Promise<ModelSlot[] |undefined>
The attachment points of a model, when another model step is attached to a slot on it. Resolves to undefined when nothing is, so models nothing is attached to never cost a request.
Parameters
parent
{ kind: "Product"; } | { kind: "Step"; stepName: string; }
assetKey
string | undefined
Returns
Promise<ModelSlot[] | undefined>
getPreviewService
getPreviewService: () =>
ThreeDPreviewService|undefined
Returns
ThreeDPreviewService | undefined
getRegionElements
getRegionElements: (
stepName) =>RegionElement[]
Parameters
stepName
string
Returns
getSerializedStep
getSerializedStep: (
stepName,serializedSteps) =>SerializableStep|undefined
Parameters
stepName
string
serializedSteps
SerializableStep[]
Returns
SerializableStep | undefined
getStepErrors
getStepErrors: (
stepName) =>Map<string,string> |undefined
Gets any validation errors for a specific step, or undefined if there are none.
Parameters
stepName
string
Returns
Map<string, string> | undefined
getStepSelections
getStepSelections: () =>
StepSelections
Returns
StepSelections
getStepSpecificServices
getStepSpecificServices: (
stepName) =>StepSpecificServices|undefined
Parameters
stepName
string
Returns
StepSpecificServices | undefined
getStepStorage
getStepStorage: (
stepName) =>StepStorage|undefined
Parameters
stepName
string
Returns
StepStorage | undefined
getTransactionCustomer
getTransactionCustomer: () =>
Customer|undefined
Returns
Customer | undefined
getUpdatesPending
getUpdatesPending: () =>
boolean
Returns
boolean
getValidationErrors
getValidationErrors: () =>
ValidationErrors
Gets validation errors for all steps. Only steps with errors will be present.
Returns
ValidationErrors
getWorkflowMetadata
getWorkflowMetadata: () =>
WorkflowMetadata
Returns
getWorkflowSelections
getWorkflowSelections: () =>
WorkflowSelections
Returns
markStepsAsInitialised
markStepsAsInitialised: (
stepNames) =>void
Parameters
stepNames
string[]
Returns
void
markUpdateCompleted
markUpdateCompleted: (
id) =>void
Parameters
id
string
Returns
void
markUpdatePending
markUpdatePending: () =>
string
Returns
string
outstandingRequestsPromise
outstandingRequestsPromise: () =>
Promise<void>
Returns
Promise<void>
removeRecipientCallback
removeRecipientCallback: (
callback) =>void
Parameters
callback
RecipientCallback
Returns
void
reset
reset: () =>
Promise<void>
Returns
Promise<void>
setCurrentAdjustingStepId
setCurrentAdjustingStepId: (
stepId) =>void
Parameters
stepId
string
Returns
void
setEditedStatus
setEditedStatus: (
stepName,status) =>void
Parameters
stepName
string
status
boolean
Returns
void
setInformationResults
setInformationResults: (
results) =>void
Parameters
results
Returns
void
setMandatoryFulfilled
setMandatoryFulfilled: (
stepName,status) =>void
Parameters
stepName
string
status
boolean
Returns
void
setModelContainer
setModelContainer: (
container) =>void
Parameters
container
ModelContainer
Returns
void
setSelectionsAndElements
setSelectionsAndElements: (
stepName,variants,elements,callback?) =>Promise<void>
Parameters
stepName
string
variants
elements
callback?
() => Promise<void>
Returns
Promise<void>
setStepError
setStepError: (
stepName,field,error) =>void
Parameters
stepName
string
field
string
error
string | undefined
Returns
void
setTransactionCustomer
setTransactionCustomer: (
customer) =>void
Parameters
customer
Returns
void
setTransactionCustomerDetails
setTransactionCustomerDetails: (
details) =>void
Parameters
details
email
string
Returns
void
Deprecated
Use setTransactionCustomer instead.
setWorkflow
setWorkflow: (
workflow) =>Promise<void>
Sets the current workflow for this experience.
Parameters
workflow
The new workflow to set.
Returns
Promise<void>
A promise that resolves when the workflow has been set.
setWorkflowStateSyncEnabled
setWorkflowStateSyncEnabled: (
enabled) =>void
Enables or disables uploading of workflow state to the server.
Parameters
enabled
boolean
When true, workflow state will be uploaded to the server.
Returns
void
toggleDesignConfirmed
toggleDesignConfirmed: () =>
void
Returns
void
updateMetadata
updateMetadata: (
stepName,update) =>void
Parameters
stepName
string
update
any
Returns
void
updateStateWithServerImmediate
updateStateWithServerImmediate: (
getReducerState) =>Promise<void>
Parameters
getReducerState
() => CommandState
Returns
Promise<void>
Deprecated
State updates are being pulled internally. This function will be removed in the future.
updateStorage
updateStorage: (
stepName,update) =>void
Parameters
stepName
string
update
Returns
void
Methods
approveTransaction()
approveTransaction(
note?):Promise<void>
Parameters
note?
string
Returns
Promise<void>
drawSilentSteps()
drawSilentSteps():
Promise<SilentStepFailure[] |undefined>
Draws every active silent step which has not been drawn yet, each one independently, so one failing step cannot stop the others. A failed step is left undrawn and tried again by the next call.
Returns
Promise<SilentStepFailure[] | undefined>
The steps which could not be drawn, or undefined if updateWorkflowConfiguration was called while
this was running. In that case nothing was changed on the canvas, because the result was for an older
configuration, and the newer call is responsible for drawing the steps.
ejectFromPreviewService()
ejectFromPreviewService():
void
Ejects the model of this product from the preview service. This also sets the internal preview service to undefined.
Returns
void
getClient()
getClient():
SpiffCommerceClient
Returns the client that was responsible for spawning this manager.
Returns
getInformationResults()
getInformationResults():
InformationResult[]
Returns
getInitialOptionIds()
getInitialOptionIds(
existingSelections?):Promise<Set<string>>
Returns a set of strings representing the identifiers of the minimal set of options required to satisfy the default initial loaded state of the workflow.
Parameters
existingSelections?
StepSelections
Returns
Promise<Set<string>>
getStateHash()
getStateHash():
Promise<string>
Returns
Promise<string>
getStepTags()
getStepTags(
stepId):string[]
Returns the tags for a step.
Parameters
stepId
string
Returns
string[]
getTemplatingContext()
getTemplatingContext():
object
Returns the context object used for text templating.
Returns
object
getWorkflowExperience()
getWorkflowExperience():
WorkflowExperience
Returns the workflow experience that was responsible for creating this manager.
Returns
injectIntoPreviewService()
injectIntoPreviewService(
previewService,refocusCamera?,options?):Promise<void>
Injects the model of this product into the preview service. This also overwrites the internal preview service.
Parameters
previewService
ThreeDPreviewService
The preview service to inject into.
refocusCamera?
boolean
Optional: Run camera focus Defaults to true.
options?
InjectIntoPreviewOptions
Returns
Promise<void>
isInitialized()
isInitialized():
boolean
Returns true when the initial state of the workflow has been loaded and settled.
Returns
boolean
rejectTransaction()
rejectTransaction(
note?):Promise<void>
Parameters
note?
string
Returns
Promise<void>
traversableScenes()
traversableScenes():
Promise<WorkflowScene[]>
Returns
Promise<WorkflowScene[]>
updateRecipient()
updateRecipient(
firstName?,lastName?,address?,suburb?,state?,email?,postalCode?,country?,mobile?,company?,apartment?,customField1?,customField2?,customField3?,customField4?,customField5?,conversionConfigurationId?,prevalidated?):Promise<void>
Create or amend the recipient fo the transaction.
Parameters
firstName?
string
lastName?
string
address?
string
suburb?
string
state?
string
email?
string
postalCode?
string
country?
string
mobile?
string
company?
string
apartment?
string
customField1?
string
customField2?
string
customField3?
string
customField4?
string
customField5?
string
conversionConfigurationId?
string
prevalidated?
boolean
Returns
Promise<void>
updateTransactionShareActions()
updateTransactionShareActions():
Promise<void>
Re-fetches the transactionShareActions for this WorkflowManager's Transaction object.
The updated transactionShareActions overwrite the existing values on the Transaction object returned by getTransaction().
Returns
Promise<void>
updateTransactionStakeholders()
updateTransactionStakeholders():
Promise<void>
Re-fetches the stakeholders and currentStakeholder for this WorkflowManager's Transaction object.
The updated stakeholders and currentStakeholder overwrite the existing values on the Transaction object returned by getTransaction().
Returns
Promise<void>
updateWorkflowConfiguration()
updateWorkflowConfiguration(
changes):Promise<void>
Updates the workflow configuration and regenerates affected internal structures. Handles panel changes, step changes, and scene reorganization while preserving user state where possible.
Silent steps (Product Overlay, Silent Illustration) which were changed or added are NOT drawn here, so a slow
image can never hold up the update. Call drawSilentSteps afterwards. Calling this also cancels any silent step
draw that is still running, because it was started for an older configuration.
Parameters
changes
Returns
Promise<void>