Skip to content
Docs
Reference

BackstageClient.fulfilmentExceptions

BackstageClient.fulfilmentExceptions in @ticketlayer/backstage.

@ticketlayer/backstage


@ticketlayer/backstage / BackstageClient / fulfilmentExceptions

fulfilmentExceptions: {
  list: (options?: {
     limit?: number;
     orderId?: string;
     state?: "open" | "resolved" | "all";
   }, requestOptions?: RequestOptions) => Promise<{
     accountId: string;
     details: string | null;
     exception: string | null;
     id: string;
     method: string | null;
     orderId: string;
     priority: string;
     raisedAt: string;
     resolutionNotes: string | null;
     resolvedAt: string | null;
     resolvedBy: string | null;
     state: "open" | "resolved";
     taskType:   | "fulfilment.exception"
        | "fulfilment.scan_mismatch"
        | "fulfilment.parcel_returned";
     unitId: string | null;
  }[]>;
  resolve: (taskId: string, request: {
     note: string;
   }, requestOptions?: RequestOptions) => Promise<{
     accountId: string;
     details: string | null;
     exception: string | null;
     id: string;
     method: string | null;
     orderId: string;
     priority: string;
     raisedAt: string;
     resolutionNotes: string | null;
     resolvedAt: string | null;
     resolvedBy: string | null;
     state: "open" | "resolved";
     taskType:   | "fulfilment.exception"
        | "fulfilment.scan_mismatch"
        | "fulfilment.parcel_returned";
     unitId: string | null;
  }>;
};

Defined in: client.ts:7245

Fulfilment Exceptions methods

list()#

list: (options?: {
  limit?: number;
  orderId?: string;
  state?: "open" | "resolved" | "all";
}, requestOptions?: RequestOptions) => Promise<{
  accountId: string;
  details: string | null;
  exception: string | null;
  id: string;
  method: string | null;
  orderId: string;
  priority: string;
  raisedAt: string;
  resolutionNotes: string | null;
  resolvedAt: string | null;
  resolvedBy: string | null;
  state: "open" | "resolved";
  taskType:   | "fulfilment.exception"
     | "fulfilment.scan_mismatch"
     | "fulfilment.parcel_returned";
  unitId: string | null;
}[]>;

List fulfilment exceptions What fulfilment raised for a person to deal with, on the accounts the caller can read: open ones oldest first by default. Filter by state (open, resolved, all) or one order. Each is a task of a fulfilment type, also in the tasks inbox. Needs orders.read.

Parameters#

ParameterType
options?{ limit?: number; orderId?: string; state?: "open" | "resolved" | "all"; }
options.limit?number
options.orderId?string
options.state?"open" | "resolved" | "all"
requestOptions?RequestOptions

Returns#

Promise<{ accountId: string; details: string | null; exception: string | null; id: string; method: string | null; orderId: string; priority: string; raisedAt: string; resolutionNotes: string | null; resolvedAt: string | null; resolvedBy: string | null; state: "open" | "resolved"; taskType: | "fulfilment.exception" | "fulfilment.scan_mismatch" | "fulfilment.parcel_returned"; unitId: string | null; }[]>

Operation Id#

listFulfilmentExceptions

resolve()#

resolve: (taskId: string, request: {
  note: string;
}, requestOptions?: RequestOptions) => Promise<{
  accountId: string;
  details: string | null;
  exception: string | null;
  id: string;
  method: string | null;
  orderId: string;
  priority: string;
  raisedAt: string;
  resolutionNotes: string | null;
  resolvedAt: string | null;
  resolvedBy: string | null;
  state: "open" | "resolved";
  taskType:   | "fulfilment.exception"
     | "fulfilment.scan_mismatch"
     | "fulfilment.parcel_returned";
  unitId: string | null;
}>;

Resolve a fulfilment exception Mark an exception dealt with, saying what was done: its task is closed as done with the note, as deciding it with resolve would. Resolving one already closed changes nothing. Needs orders.update on the order's account.

Parameters#

ParameterType
taskIdstring
request{ note: string; }
request.notestring
requestOptions?RequestOptions

Returns#

Promise<{ accountId: string; details: string | null; exception: string | null; id: string; method: string | null; orderId: string; priority: string; raisedAt: string; resolutionNotes: string | null; resolvedAt: string | null; resolvedBy: string | null; state: "open" | "resolved"; taskType: | "fulfilment.exception" | "fulfilment.scan_mismatch" | "fulfilment.parcel_returned"; unitId: string | null; }>

Operation Id#

resolveFulfilmentException