***

title: "DefaultStockAllocationStrategy"
generated: true
---------------

<GenerationInfo sourceFile="packages/core/src/config/order/default-stock-allocation-strategy.ts" sourceLine="14" packageName="@vendure/core" />

Allocates stock when the Order transitions from `ArrangingPayment` to either
`PaymentAuthorized` or `PaymentSettled`.

```ts title="Signature"
class DefaultStockAllocationStrategy implements StockAllocationStrategy {
    shouldAllocateStock(ctx: RequestContext, fromState: OrderState, toState: OrderState, order: Order) => boolean | Promise<boolean>;
}
```

* Implements: [`StockAllocationStrategy`](/current/core/reference/typescript-api/orders/stock-allocation-strategy#stockallocationstrategy)

<div className="members-wrapper">

### shouldAllocateStock

\<MemberInfo kind="method" type={`(ctx: <a href='/current/core/reference/typescript-api/request/request-context#requestcontext'>RequestContext</a>, fromState: <a href='/current/core/reference/typescript-api/orders/order-process#orderstate'>OrderState</a>, toState: <a href='/current/core/reference/typescript-api/orders/order-process#orderstate'>OrderState</a>, order: <a href='/current/core/reference/typescript-api/entities/order#order'>Order</a>) => boolean | Promise<boolean>`}   />

</div>
