SalesSTREAM – ODOO CONNECTOR

STREAM – ODOO CONNECTOR

EXTENDED USER MANUAL

Introduction

The Stream Odoo Connector is a custom integration module developed to establish seamless communication between Odoo and the Stream shipping platform. The connector automates the exchange of order, shipment, and tracking information, eliminating manual data entry and improving operational efficiency.

The primary objective of this module is to synchronize sales orders from Odoo to Stream for shipment processing and to retrieve shipment-related updates, including tracking details and delivery statuses, back into Odoo. This integration ensures data consistency across both systems while reducing processing time and minimizing human errors.

The connector supports secure authentication, configurable company-level settings, automated order export, shipment tracking synchronization, postal service mapping, stock location mapping, and scheduled background synchronization through cron jobs.

Authentication

Before using the Stream Connector, the connection between Odoo and the Stream platform must be established. The connector uses Client ID and Client Secret based authentication to securely communicate with the Stream APIs.

Navigate to:

Settings → Users & Companies → Companies → Stream Integration

The following fields must be configured:

1. Stream Base URL

The base API endpoint provided by Stream. All API requests are sent to this URL.

2. Stream Client ID

The unique Client ID issued by Stream for authenticating the application.

3. Stream Client Secret

The secret key associated with the Client ID. It is used to securely obtain an access token.

4. Stream Webhook URL

The callback URL where Stream sends shipment and order status updates to Odoo.

Authentication Process

  1. Open the Stream Integration tab in the Company settings.
  2. Enter the Stream Base URL, Client ID, and Client Secret provided by Stream.
  3. Click the Authenticate button.

When the Authenticate button is clicked, the connector performs the following operations:

  • Sends an authentication request to the Stream OAuth/API endpoint using the configured Client ID and Client Secret.
  • Validates the supplied credentials with the Stream server.
  • If authentication is successful, Stream returns an Access Token along with its expiration time.
  • The connector securely stores the access token and token expiry in the company configuration.
  • The Stream Connected status is updated to indicate that the connection has been successfully established.
  • All subsequent API requests made by the connector automatically use the stored access token in the request headers until the token expires.

After successful authentication, the connector is ready to perform further operations such as:

  • Fetching depot information.
  • Registering webhooks.
  • Retrieving registered webhooks.
  • Exporting sales orders to Stream.
  • Synchronizing shipment tracking and delivery status.

Note: Authentication must be completed successfully before any Stream API operation can be executed. If the access token expires, the connector must be authenticated again to obtain a new token.

Stream Menu in Sales Module

After installing the Stream Odoo Connector, a new Stream menu is added to the Sales module. This menu provides access to all Stream-specific master data and operational records required for the integration.

Sales → Stream

The Stream menu consists of the following submenus:

1. Stream Depot

The Stream Depot menu stores the list of depots (warehouses or distribution centers) retrieved from the Stream platform.

Purpose

  • Maintains the depot information available in Stream.
  • Used while exporting sales orders to identify the correct dispatch location.
  • Synchronized from Stream using the Fetch Depots action available in the Company configuration.

Information Stored

  • Depot Name
  • Depot Code
  • City
  • Additional depot details received from Stream

2. Stream Services

The Stream Services menu is used to configure the shipping services that will be used while exporting sales orders to the Stream platform. Unlike depots, these services are created and maintained manually in Odoo based on the organization's shipping requirements.

Purpose

  • Define the shipping services available for order processing.
  • Configure default shipping parameters for each service.
  • Automatically populate shipping-related information on sales orders when a service is selected.
  • Reduce manual data entry and ensure consistent shipping configuration.

Information Stored

Service Name

Name of the shipping service

Default Stock Location

The stock location from which the order will be dispatched by default

Service Level

The default shipping/service level associated with the service

Order Type

The default Stream order type (e.g., Delivery, Collection, etc.) to be used during export

3. Run Details

The Run Details menu maintains information about delivery runs received from Stream.

Purpose

  • Stores delivery run schedules.
  • Associates consignments with their assigned delivery runs.
  • Helps users monitor the dispatch process and delivery planning.

Information Stored

  • Run ID
  • Run Description
  • Order Number
  • Driver Details
  • Vehicle Details
  • Scheduled Date and Time

4. Delivery Methods

The Delivery Methods menu is used to configure the mapping between Odoo delivery methods and Stream shipping services.

Purpose

  • Defines which Stream service should be used for a particular delivery method.
  • Eliminates manual service selection during order export.
  • Ensures orders are exported using the appropriate shipping configuration.

Exporting Sale Order to Stream

Once the Stream Connector has been configured and authenticated, users can create Sales Orders that are ready for export to the Stream platform.

Sales → Orders → Quotations → Create

While creating a Sales Order, the user enters the standard Odoo order details such as:

  • Customer
  • Order Lines
  • Delivery Address
  • Quantity
  • Products

Stream Information

The following fields are available on the Sales Order:

Stream Service

Select the shipping service configured under Sales → Stream → Stream Services

Stock Location

Automatically populated based on the selected Stream Service.

Service Level

Automatically populated from the selected Stream Service.

Order Type

Automatically populated from the selected Stream Service.

Depot

Automatically determined from the selected stock location or service configuration.

When the Stream Service is selected, the connector automatically fills the configured shipping details, reducing manual effort and ensuring that all required information is available before exporting the order.

Selecting the Stream Delivery Method

The Stream Delivery Method is configured from the Delivery tab of the Sales Order.

To select a Stream delivery method:

  1. Open the required Sales Order.
  2. Navigate to the Delivery tab.
  3. Click the arrow (â–¶) next to the selected delivery method to open its detailed configuration.
  4. In the delivery method form, select the required Stream Delivery Method from the available options.
  5. Save the changes.

After confirming the Sales Order, it can be exported to the Stream platform.

The connector provides an Export to Stream button on the Sales Order form.

Single Order Export

The Export to Stream button exports only the Confirmed Sales Orders Which are not yet Exported to stream.

During export, the connector performs the following validations:

  • Confirms that Stream authentication is active.
  • Verifies that the order has not already been exported.
  • Generates the request payload according to the Stream API specification.
  • Sends the Sales Order to Stream.

If the export is successful:

  • The order is marked as Exported.
  • Stream Consignment Number is stored.
  • Tracking details returned by Stream are saved.
  • Export status is updated on the Sales Order.

If any validation fails or the API returns an error, the export is aborted and the error is displayed to the user

Bulk Export of Sales Orders

To improve operational efficiency, the connector also supports exporting multiple Sales Orders simultaneously.

Users can:

  1. Open the Sales Order list view.
  2. Select one or more eligible Sales Orders.
  3. Click Action → Export to Stream.

The connector processes each selected order individually.

For every Sales Order, it:

  • Performs validation checks.
  • Creates the Stream API payload.
  • Sends the order to Stream.
  • Records the export result.

Orders that fail validation or encounter API errors do not interrupt the processing of the remaining selected orders. A success or failure status is maintained for each order independently.

Automatic Export Using Cron Job

The Stream Connector includes a scheduled Cron Job that automatically exports eligible Sales Orders to the Stream platform.

Purpose

The cron job eliminates the need for manual exports

Workflow

At every scheduled execution, the cron job:

  • Searches for confirmed Sales Orders that have not yet been exported.
  • Verifies Stream authentication.
  • Validates the required shipping information.
  • Generates the Stream request payload.
  • Exports the order to Stream.
  • Updates the export status and stores the Stream response.

This automation ensures that newly confirmed Sales Orders are synchronized with the Stream platform without requiring user intervention.

Note: Orders that have already been exported are automatically skipped during subsequent cron executions, preventing duplicate exports.

Creating Delivery Runs in Stream

After a Sales Order has been successfully exported from Odoo, it becomes available in the Stream platform for shipment processing.

To assign exported orders for delivery:

  1. Log in to the Stream application.
  2. Navigate to the Runs section.
  3. Create a new delivery run by providing the required run information (such as depot, driver, route, or delivery schedule, depending on the Stream configuration).
  4. Save the run.
  5. Locate the exported orders in the list of unassigned consignments.
  6. Drag and drop the required orders into the newly created run.
  7. Save or publish the run.

Once the orders are assigned, Stream associates each consignment with the selected delivery run. The run information is then available to be synchronized back into Odoo.

Synchronizing Run Details in Odoo

After the delivery run has been created and the orders have been assigned in Stream, the corresponding run details can be retrieved in Odoo.

Steps

  1. Open the exported Sales Order in Odoo.
  2. Click the Sync Run Details button.
  3. The connector sends a request to the Stream API using the order's consignment information.
  4. Stream returns the latest run details associated with that order.
  5. Odoo updates the Sales Order with the retrieved information.

The synchronized information may include:

  • Run Number
  • Run Name
  • Assigned Depot
  • Driver
  • Delivery Status
  • Scheduled Delivery Date and Time
  • Other run-related information returned by Stream

Bulk Synchronization of Run Details

In addition to synchronizing run details for an individual Sales Order, the Stream Connector also supports bulk synchronization for multiple exported orders.

Steps

  1. Navigate to Sales → Orders.
  2. Select one or more exported Sales Orders.
  3. Click Action → Sync Run Details.
  4. The connector processes each selected order individually.
  5. For every order, it sends a request to the Stream API using the corresponding consignment information.
  6. The run details returned by Stream are automatically updated on each Sales Order.

The synchronization updates information such as:

  • Run Number
  • Run Name
  • Assigned Depot
  • Driver Details
  • Delivery Status
  • Scheduled Delivery Date and Time
  • Other run-related information returned by Stream

If a selected order has not yet been assigned to a run in Stream, the connector skips that order and continues processing the remaining selected orders

Automatic Synchronization Using Cron Job

To eliminate the need for manual synchronization, the Stream Connector includes a scheduled Cron Job that automatically retrieves the latest run details from Stream.

Purpose

The cron job periodically checks for exported Sales Orders and updates them with the latest delivery run information from the Stream platform.

Workflow

At each scheduled execution, the cron job performs the following steps:

  • Searches for Sales Orders that have been successfully exported to Stream.
  • Identifies orders whose run details need to be synchronized.
  • Sends requests to the Stream API using the stored consignment numbers.
  • Retrieves the latest run information from Stream.
  • Updates the corresponding Sales Orders with the latest run details.
  • Records any synchronization failures in the integration logs.

Delete Order from Stream

The Stream Connector provides a Delete Order from Stream button on the Sales Order form, allowing users to remove an exported order from the Stream platform when it is no longer required.

Purpose

The Delete Order from Stream feature enables users to delete consignments that have been exported by mistake or need to be recreated. This helps maintain consistency between Odoo and Stream before delivery planning begins.

Prerequisites

  • The Sales Order must have been successfully exported to Stream.
  • The order must exist in the Stream platform.
  • The order must be in the Unplanned state.

Deleting an Order

To delete an order from Stream:

  1. Open the required Sales Order in Odoo.
  2. Click the Delete Order from Stream button.
  3. The connector sends a delete request to the Stream API for the corresponding consignment.
  4. If the deletion is successful, the order is removed from Stream and the related Stream information in Odoo is updated accordingly.

Validation

Before sending the delete request, the connector verifies the current status of the order in Stream.

Allowed

The order can be deleted only when its status is:

  • Unplanned

Not Allowed

If the order has already progressed in the delivery workflow, deletion is not permitted. This includes statuses such as:

  • Planned
  • Collected
  • Delivered
  • Cancelled
  • Any other status that indicates the order has already been assigned or processed.

In such cases, the connector prevents the deletion and displays an appropriate validation message.

The Stream Connector provides a Print Shipping Labels button on the Sales Order form to generate shipping labels directly within Odoo. The labels are created using the shipment information stored in Odoo after a successful export to the Stream platform.

Purpose

The Print Shipping Labels feature generates a printable shipping label containing the consignee details, shipping information, QR code, and barcode required for package identification during dispatch.

Prerequisites

Before generating a shipping label, ensure that:

  • The Sales Order has been successfully exported to Stream.
  • A valid Stream Consignment Number has been received and stored in Odoo.
  • The order contains all the required shipping and product information.

Printing a Shipping Label

To generate a shipping label:

  1. Open the required Sales Order.
  2. Click the Print Shipping Labels button.
  3. Odoo retrieves the shipment and product information associated with the order.
  4. The connector generates the shipping label in PDF format.
  5. The generated label is displayed in Odoo, allowing the user to print or download it.

Label Contents

The generated shipping label includes the following information:

  • Destination Depot
  • Shipping Address
  • Customer Name
  • Company Name
  • Sales Order Number
  • Tracking Number
  • Route Number
  • Item Code
  • Item Description
  • Package Count
  • QR Code

QR Code

The QR Code printed on the label is generated using the Stream Consignment Number received after the order is exported to Stream. This enables quick identification of the shipment during handling and delivery.

Barcode

The Barcode is generated using the Stream Consignment Number combined with the product/package sequence number. This creates a unique barcode for each package within the consignment, allowing individual package tracking and identification during warehouse and delivery operations.

Validation

Before generating the label, the connector validates that:

  • The Sales Order has been exported to Stream.
  • A valid Stream Consignment Number exists.
  • Required shipping and product details are available.

If any required information is missing, the system prevents label generation and displays an appropriate validation message.

Bulk Assignment of Postal Services

The Stream Connector provides a Bulk Postal Service Assignment feature that allows users to assign a postal service to multiple Sales Orders simultaneously. This significantly reduces manual effort when processing large volumes of orders.

Purpose

The Bulk Postal Service Assignment feature enables users to configure shipping information for multiple Sales Orders in a single operation. Once a postal service is selected, the connector automatically populates the associated shipping details for all selected orders.

Steps

  1. Navigate to Sales → Orders.
  2. Select one or more Sales Orders from the list view.
  3. Click Action → Select Postal Service (or the corresponding bulk action).
  4. Select the required Stream Postal Service.
  5. Click Apply.
  6. The connector updates all selected Sales Orders with the chosen postal service.

Automatic Population of Shipping Details

When a postal service is assigned, the connector automatically retrieves the configuration associated with that service and populates the following fields on each Sales Order:

  • Depot
  • Stock Location
  • Service Level
  • Order Type

These values are derived from the predefined configuration of the selected postal service, ensuring that all orders use consistent shipping settings.

Benefits

  • Assigns a postal service to multiple Sales Orders in a single action.
  • Automatically fills the corresponding depot, stock location, service level, and order type.
  • Eliminates repetitive manual updates for each Sales Order.
  • Ensures consistent shipping configuration across all selected orders.
  • Improves efficiency when preparing large batches of orders for export to the Stream platform.

Note: The postal service must be configured with the required default values before it can be used for bulk assignment. Any Sales Order updated through this feature will automatically inherit the associated shipping configuration from the selected postal service.

Automatic Order Status Synchronization

The Stream Connector includes a scheduled Cron Job that automatically synchronizes the latest order status from the Stream platform to Odoo. This ensures that users always have up-to-date shipment information without manually checking the Stream application.

Purpose

The Order Status Synchronization cron job periodically retrieves the latest status of all exported orders from Stream and updates the corresponding Sales Orders in Odoo.

Conclusion

The Stream Odoo Connector streamlines the complete shipping workflow by integrating Odoo with the Stream platform. It automates order export, delivery management, shipment tracking, label generation, and status synchronization, reducing manual effort and ensuring accurate, real-time shipping information throughout the order fulfillment process.