---
title: "FulfillmentProcess"
generated: true
---
<GenerationInfo sourceFile="packages/core/src/config/fulfillment/default-fulfillment-process.ts" sourceLine="45" packageName="@vendure/core" since="2.0.0" />

The default <DocsLink href="/reference/typescript-api/fulfillment/fulfillment-process#fulfillmentprocess">FulfillmentProcess</DocsLink>. This process includes the following actions:

- Executes the configured `FulfillmentHandler.onFulfillmentTransition()` before any state
  transition.
- On cancellation of a Fulfillment, creates the necessary <DocsLink href="/reference/typescript-api/entities/stock-movement#cancellation">Cancellation</DocsLink> & <DocsLink href="/reference/typescript-api/entities/stock-movement#allocation">Allocation</DocsLink>
  stock movement records.
- When a Fulfillment transitions from the `Created` to `Pending` state, the necessary
  <DocsLink href="/reference/typescript-api/entities/stock-movement#sale">Sale</DocsLink> stock movements are created.

<GenerationInfo sourceFile="packages/core/src/config/fulfillment/fulfillment-process.ts" sourceLine="26" packageName="@vendure/core" since="2.0.0" />

A FulfillmentProcess is used to define the way the fulfillment process works as in: what states a Fulfillment can be
in, and how it may transition from one state to another. Using the `onTransitionStart()` hook, a
FulfillmentProcess can perform checks before allowing a state transition to occur, and the `onTransitionEnd()`
hook allows logic to be executed after a state change.

For detailed description of the interface members, see the <DocsLink href="/reference/typescript-api/state-machine/state-machine-config#statemachineconfig">StateMachineConfig</DocsLink> docs.

```ts title="Signature"
interface FulfillmentProcess<State extends keyof CustomFulfillmentStates | string> extends InjectableStrategy {
    transitions?: Transitions<State, State | FulfillmentState> &
        Partial<Transitions<FulfillmentState | State>>;
    onTransitionStart?: OnTransitionStartFn<State | FulfillmentState, FulfillmentTransitionData>;
    onTransitionEnd?: OnTransitionEndFn<State | FulfillmentState, FulfillmentTransitionData>;
    onTransitionError?: OnTransitionErrorFn<State | FulfillmentState>;
}
```
* Extends: <DocsLink href="/reference/typescript-api/common/injectable-strategy#injectablestrategy">`InjectableStrategy`</DocsLink>



<div className="members-wrapper">

### transitions

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/state-machine/transitions#transitions'>Transitions</a>`<State, State | `<a href='/reference/typescript-api/fulfillment/fulfillment-state#fulfillmentstate'>FulfillmentState</a>`> &#38;         Partial<`<a href='/reference/typescript-api/state-machine/transitions#transitions'>Transitions</a>`<`<a href='/reference/typescript-api/fulfillment/fulfillment-state#fulfillmentstate'>FulfillmentState</a>` | State>>``}   />


### onTransitionStart

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/state-machine/state-machine-config#ontransitionstartfn'>OnTransitionStartFn</a>`<State | `<a href='/reference/typescript-api/fulfillment/fulfillment-state#fulfillmentstate'>FulfillmentState</a>, <a href='/reference/typescript-api/fulfillment/fulfillment-transition-data#fulfillmenttransitiondata'>FulfillmentTransitionData</a>`>``}   />


### onTransitionEnd

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/state-machine/state-machine-config#ontransitionendfn'>OnTransitionEndFn</a>`<State | `<a href='/reference/typescript-api/fulfillment/fulfillment-state#fulfillmentstate'>FulfillmentState</a>, <a href='/reference/typescript-api/fulfillment/fulfillment-transition-data#fulfillmenttransitiondata'>FulfillmentTransitionData</a>`>``}   />


### onTransitionError

<MemberInfo kind="property" type={`<a href='/reference/typescript-api/state-machine/state-machine-config#ontransitionerrorfn'>OnTransitionErrorFn</a>`<State | `<a href='/reference/typescript-api/fulfillment/fulfillment-state#fulfillmentstate'>FulfillmentState</a>`>``}   />




</div>
