Documents

Introduction

This configuration allows you to specify which documents can be generated from the Store App. Once configured, these documents will be displayed from the printer button (pages without scan) or from the preparation pop-up (page with scan).

 

Page without scan

By default, “shipment” and “dispatch_note” documents are displayed

Page with scan

By default, “shipment” and “dispatch_note” documents are displayed

Default configuration

Most of the time, it is not necessary to modify these elements as a default configuration exists on most pages. Here are the details.

Page

Documents by default

JSON format

Page

Documents by default

JSON format

prepare_select

  • preparation_note

[ { "name": "preparation_note", "existsIf": "documents.preparation_note", "type": "multi_parcel" } ]

pack or pack_multi

  • shipment

  • dispatch_note

[ { "name": "shipment", "existsIf": "shipment.document_id" }, { "name": "dispatch_note", "existsIf": "documents.dispatch_note" } ]

pack_scan

  • shipment

  • dispatch_note

[ { "name": "shipment", "existsIf": "shipment.document_id" }, { "name": "dispatch_note", "existsIf": "documents.dispatch_note" } ]

dispatch

  • shipment

  • dispatch_note

  • manifest

[ { "name": "shipment", "existsIf": "shipment.document_id", "entityType": "parcel" }, { "name": "dispatch_note", "existsIf": "documents.dispatch_note", "entityType": "parcel" }, { "name": "manifest", "existsIf": "document_id", "entityType": "shipment_manifest" } ]

bag or bag_multi

  • dispatch_note

[ { "name": "dispatch_note", "existsIf": "documents.dispatch_note" } ]

bag_scan

  • dispatch_note

[ { "name": "dispatch_note", "existsIf": "documents.dispatch_note" } ]

boxing

  • shipment

  • dispatch_note

[ { "name": "shipment", "existsIf": "shipment.document_id" }, { "name": "dispatch_note", "existsIf": "documents.dispatch_note" } ]

customer_search > customer_order

  • collect_note

  • shipment

  • dispatch_note

  • return_note

  • manifest

[ { "name": "collect_note", "existsIf": "documents.collect_note", "entityType": "order" }, { "name": "shipment", "existsIf": "shipment.document_id", "entityType": "parcel" }, { "name": "dispatch_note", "existsIf": "documents.dispatch_note", "entityType": "parcel" }, { "name": "return_note", "existsIf": "documents.return_note", "entityType": "return_parcel" }, { "name": "manifest", "existsIf": "documents.manifest", "entityType": "parcel" } ]

Return note - There is data inconsistency : the return note is waiting for either complete return parcel or return_parcel_id but the SA API call doesn’t provide none of this parameters

  • Root Cause: Legacy technical debt; the document parameters were not synchronized with disparate API call evolutions.

We will resolve the problem in the future but there is a workaround : implement a fallback in parameters.php to handle both ID keysreturn_parcel_id & id

Overloading the configuration

You can override the default configuration to add custom documents or delete some of the defaults by going to the Configuration > Store App > Pages > {Page name} > Documents section.

The configuration is an array of objects whose structure is as follows:

  • name (mandatory) - Name of the document. Must match the name given in the document template configuration.

  • existsIf (mandatory) - Path used to identify whether or not the document has already been generated. If the document is found via the configured path, then a green tick will be displayed and the document will simply be retrieved and not posted again.

  • entityType (optional) - Used to identify the entity in which you need to check whether the document has been generated. If not entered, the default value is "parcel". Other values can be "return_parcel", "order" or "shipment_manifest"

  • type (optional) - Used to indicate whether a custom document is a shipment. Does not need to be configured for a standard "shipment" but must be configured for "return_shipment".

Overloading this configuration completely overrides the default one . You will need to reconfigure the default documents if you wish to keep them.

Examples

Here are a few examples of overloads you can reuse.

[ { "existsIf": "shipment.document_id", "name": "shipment", }, { "existsIf": "documents.dispatch_note", "name": "dispatch_note" }, { "existsIf": "documents.gift_message", "name": "gift_message" } ]
[ { "existsIf": "shipment.document_id", "name": "shipment", }, { "existsIf": "documents.dispatch_note", "name": "dispatch_note" }, { "existsIf": "shipment.return_document_id", "name": "return_shipment", "type": "shipment" } ]
[ { "existsIf": "documents.collect_note", "name": "collect_note" } ]
[ { "existsIf": "document_id", "name": "return_note" } ]

 

Automated Document Printing via Webhooks v22

Overview

To optimize the store fulfillment process, the Store App now supports automated document printing. This feature eliminates the need for manual interaction with browser print dialogs by sending document data directly to an external printing service via webhooks.

This automation is available for all document types generated within the Store App (shipping labels, packing slips, invoices, etc.).

How It Works

When a user triggers a print action in the Store App, the system generates the document and simultaneously emits a webhook. An external middleware or local print server listens for these webhooks and sends the document to the designated physical printer in the store.

Key Benefits:

  • No Manual Clicks: Removes the need for sellers to interact with the print pop-up.

  • Speed: Accelerates the preparation and shipping flow.

  • Flexibility: Works for all document types and allows filtering by template name.


Webhook Specifications

Event Trigger

  • Topic: document_generated

  • Occurrence: Triggered immediately after successful document generation.

  • Behavior:

    • One webhook is sent per generated document.

    • If a user prints multiple documents at once, the system sends one individual webhook for each document.

    • Note: There is no retry mechanism for this webhook.

Additional Documents

Picking Note

A printable picking document is available from the Picking Progress Page.
It allows store teams to print the list of items to pick and perform picking without using a mobile device or network connection.

This note is not available on the prepare_select page

 

Information

  • The document is informational only.

  • It is not stored in OneStock.

  • It has no impact on picking status or data.

  • It represents a snapshot at a specific moment in time of the item list.

 

Configuration

Configuration > Store App > Pages > Picking > Specific Setting

{ "enable_picking_note": true }