SpiffCommerceClient
Functions
getWorkflowExperience(): Promise<WorkflowExperience>
Returns a promise that resolves to a WorkflowExperience
object. This object contains all the information you need to render a workflow experience.
Example:
const experience = await client.getWorkflowExperience(
undefined, // Deprecated: workflowId
undefined, // Deprecated: workflowState
undefined, // Optional: previewServiceConstructor
{
integrationProductId: "0123456789",
workflowId: "0123456789",
type: "integration",
} // GetWorkflowOptions
);
Parameters:
Name | Type | Description |
---|---|---|
workflowId | string | Deprecated: The ID of the workflow to request an experience for. |
workflowState | string | Deprecated: Serialized JSON string of the workflow state to initialize the experience with. |
previewServiceConstructor | (workflow: Workflow) => any | Optional: A constructor function that returns a PreviewService object. This object is used to render previews of the product. |
options | GetWorkflowOptions | An object containing information to initialize the experience with. |