How to control the timing of order processing yourself using an API trigger
"Order processing" in Penny Black refers to the workflow that starts with receiving an order and concludes when a PDF is created and stored for printing. This process involves receiving and storing the order details, potentially enriching them with additional information from third-party systems, and attempting to match the order with a live campaign. If a match is found, a personalised PDF is generated for that order.
The PDF must be ready before the order packing, making this a time-sensitive process. Typically, matching order details and generating a PDF takes about 5 seconds, but this can be extended if additional data from external systems is needed, particularly for campaign segmentation.
For instance, Klaviyo’s post-purchase segmentation may take considerably longer, depending on its reliance on other systems. To manage this, you can set a fixed processing delay in Settings.
However, this may not accommodate the matching where the processing time for third parties like Klaviyo ranges from seconds to hours. Alternatively, you can switch to trigger-based order processing, where orders are ingested but not processed until the platform is told to.
Configuration
To enable manual triggering of order processing you must tick the option on the General tab of the Settings page:
There is a warning here because as soon as this is ticked all automatic order processing will stop and orders will only be processed from your trigger.
If you are already using Penny Black then you must build the trigger API call first before switching over to this approach.
API trigger
See our API documentation for the endpoint to trigger processing manually. For this API call, you need your Ecommerce API key (also in app Settings) and the order number or ID.
In addition, you can also enrich your order data with further information as part of this call. The additional_order_data field can be provided and the format matches the order section of our main order ingest API call. You can overwrite any attribute of the order (but not customer information at this time). An example use-case here is adding additional custom attributes or tags to the order.
To debug the eventual output of both the trigger and enrichment use the Activity page within our app to see the order flow through matching and rendering and check the order details overlay.