Full Procurement Integration Request Middleware

Prev Next

Overview

ServiceTitan simplifies procurement for businesses by integrating purchase order management and supply chain workflows with suppliers. This is achieved through API-based communication, exchanging key data like purchase orders, pricing, branches, and stock levels. Middleware ensures seamless integration by transforming data formats and enabling reliable communication between ServiceTitan and supplier systems.


Who uses this feature

  • Supply Chain partners, vendors, suppliers

  • Applies to all business types

What you need to get started

Before getting started, ensure you have the following prerequisites ready:

Things to know

  • ServiceTitan provides four main endpoints for supplier integration – Account, Branch (Default Branch), Pricing, and Purchase Order. To learn more about the endpoint configuration, see Full Procurement Integration generic endpoints.

  • Analyze the existing APIs using Full Procurement Integration generic endpoints article to assess compatibility by comparing request/response specifications. For APIs that are not compatible, you have two options:        

    • Use the Middleware liquid templates to modify an existing API to accept/provide the data and bring it into compatibility with ServiceTitan.

    • Create a new API endpoint specifically for ServiceTitan using the generic endpoints templates.

  • For a seamless and efficient integration experience, download and use our CLI Tool. This tool is designed to streamline the integration process by automating key steps, reducing manual effort, and ensuring accuracy.

  • To explore more about ServiceTitan's supply chain integrations and supplier features, check out Available Supply Chain Integrations.

  • Visit our Full Procurement Integration knowledge base landing page to access all the relevant customer-facing articles about supply chain workflows in ServiceTitan.

Request Middleware and integration challenges

When ServiceTitan makes an API request, it always involves two data formats: ServiceTitan's format and the supplier's format. While both systems typically handle the same information, they represent it differently, and each supplier uses a unique data structure. To address this, ServiceTitan uses middleware to customize requests and responses for each vendor. The middleware changes the data from each vendor to match ServiceTitan's standard format, ensuring compatibility regardless of changes in the data structures. This approach eliminates manual adjustments and simplifies communication across all integrations.

Request Middleware role in supply chain

Middleware addresses format differences between systems in a generic way. It accepts the request, restructures it into the receiver's API format, and then restructures the response back to the original format. Acting as an intermediary, middleware allows each API to operate in its native format without needing to account for differences on the other side. This is achieved using Liquid templates, which dynamically transform requests and responses based on the original data. These templates can be updated in real time without requiring code changes or service redeployment.

The integration workflow is managed through a series of steps that outline the transformation and communication process. The main entities for this process are ServiceTitan, Request Middleware and the Supplier system.

The roles and actions performed by each entity in the integration are as follows:

  1. ServiceTitan: Sends a request in the standard ServiceTitan format to the Request Middleware (RM).

  2. Request Middleware (RM): Transforms the request into the vendor-specific format and performs the necessary authentication.

  3. Supplier: Receives the transformed request from RM and sends a response back to RM.

  4. Request Middleware (RM): Transforms the supplier's response into the standard ServiceTitan format.

  5. ServiceTitan: Receives the response in the standard format, completing the communication loop.

Request Middleware visual

Creating vendor configurations and endpoints

To set up the request middleware for supplier integrations, follow these recommended steps:

  1. Supplier Configuration: Define the details and integration parameters to establish a foundation for communication.

  2. Authentication: Configure authentication methods. For more, see Full Procurement Integration authentication process.        

    1. Basic

    2. OAuth2

    3. ApiKey

  3. Endpoint Configuration: Endpoint configuration includes having request/response templates and testing in a sandbox to ensure proper functionality. For more, see Full Procurement Integration generic endpoints.        

    1. Write Request Template: Data or command sent from ServiceTitan to the supplier's system.

    2. Write Response Template: Data or status returned by the supplier's system after processing the request.

    3. Test in Sandbox: Validate the configurations by testing the request and response workflows in a sandbox environment to ensure proper functionality.

Supplier Configuration visual

Want to learn more?