Order Fulfillment
While you submit orders to Stream, there are multiple methods of fulfillment that can be used based on the needs of the order. These types include:
Order Fulfillment Types
There are multiple types of fulfillment that can be submitted to Stream.
- delivery: An order that is being delivered to a customer.
- merchant_managed_delivery: An order that is being delivered to a customer by a merchant's employee / dispatch system.
- pickup: An order that is being picked up by a customer.
- curbside: An order that is being picked up by a customer at a curbside location.
- drive_thru: An order that is being picked up at a drive thru window.
- dine_in: An order that is being taken at a dine in location.
Only orders with a fulfillment_type of "drive_thru" may be submitted as unpaid. All other orders submitted through this integration must be paid at the time of submission.
Delivery
- Used for orders that are being delivered to a customer, with all delivery components and details managed by the DSP partner. Treated similar to a pickup order from a POS perspective.
Pickup
- Used for orders that are being picked up by a customer, can leverage the ready_for_pickup status to notify the customer that their order is ready.
Curbside
- Used for orders that are being picked up by a customer at a curbside location, can leverage the ready_for_pickup status to notify the customer that their order is ready but we do not offer a customer -> pos arrival notification.
Drive Thru
- Used for orders that are being picked up at a drive thru window, can be submitted unpaid for pay at window operations.
Merchant Managed Delivery
Used for orders that are being delivered to a customer by a merchant's employee / dispatch system.
Populate the
delivery_addressfield to submit the delivery address details.Populate the
fulfillment_instructionsfield to submit the delivery instructions.Populate the
driver_tipwith relevant tip information for driver.Populate the
delivery_feeand/ordelivery_fee_taxeswith relevant delivery fee information for reconciliation.
Delivery Status Updates
For merchant_managed_delivery orders that are dispatched by a connected dispatch system, Stream sends delivery events to your webhook endpoint at /stream-dsp/v1/event to keep you informed of the delivery progress. These events are sent automatically as the delivery status changes.
Event Structure
Stream sends a delivery_status_update event with the following structure:
{
"type": "delivery_status_update",
"delivery_status": "enroute_to_pickup",
"order_id": "your_order_id",
"location_id": "your_location_id",
"driver_details": {
"source": "doordash",
"name": "John Driver",
"phone": {
"number": "+15555551234",
"code": "123"
},
"vehicle_info": {
"make": "Toyota",
"model": "Camry",
"color": "Silver",
"license_plate": "ABC1234"
},
"handoff_instructions": "Please verify driver ID",
"passcode": "1234"
}
}
Driver Details
When a driver is assigned, the driver_details object is included in the event payload. This contains driver contact information, vehicle details, handoff instructions, and a passcode for merchant verification.
Configuration
No additional configuration is required to receive delivery status updates. These events are automatically sent to your existing webhook endpoint at /stream-dsp/v1/event once an order with fulfillment_type of merchant_managed_delivery is accepted.