ml-connector
Microsoft Dynamics GPServiceTitan

Microsoft Dynamics GP and ServiceTitan integration

ServiceTitan runs dispatch and invoicing for HVAC and plumbing contractors. Microsoft Dynamics GP runs the back-office accounting and GL. Connecting them keeps your job costs, invoices, and vendor bills flowing from the field into the general ledger without manual re-entry. New invoices from ServiceTitan post into Microsoft Dynamics GP on schedule, allocated to the job or cost code that created them, and AP bills from received purchase orders sync back to keep vendor balances current.

How Microsoft Dynamics GP works

Microsoft Dynamics GP exposes vendors, payables invoices, purchase orders, payments, GL accounts, and journal entries through REST Service Based Architecture (SBA) at https://<server>:<port>/GPService/Tenants(<TenantName>)/Companies(<CompanyName>)/<Module>/<Resource>, or through SOAP/WCF Web Services for older installations. All calls require Windows Authentication with Active Directory credentials tied to a GP User account. Microsoft Dynamics GP does not support webhooks, so records are read by polling with ModifiedDate filters. The system enforces strict constraints: write operations only work on unposted transactions, fiscal periods must be open, and SBA POST/PATCH payloads must wrap data in a top-level Payload key. Company names are actual SQL Server database names, not human-readable labels.

How ServiceTitan works

ServiceTitan exposes invoices, payments, inventory bills (AP bills), purchase orders, vendors, customers, jobs, appointments, and tax zones through REST APIs at https://api.servicetitan.io/v2/tenant/{tenantId}/ in production. All calls require OAuth2 client credentials and an ST-App-Key header, with tokens valid for 15 minutes. ServiceTitan supports outbound webhooks with HMAC-SHA256 signature verification for events like invoice.created and invoice.updated, with retry intervals of 10s, 30s, 60s, and 300s. AP bills are read-only, generated automatically when a purchase order is marked received. The platform enforces a 60-call-per-second rate limit and a 100-second request timeout. GL accounts are not exposed via API and must be mapped through the ServiceTitan UI or external connectors.

What moves between them

The main flow runs from ServiceTitan into Microsoft Dynamics GP. When a ServiceTitan job is completed and invoiced, ml-connector reads the invoice and posts a payables or receivables document into Microsoft Dynamics GP's general ledger, allocated to the correct GL account and cost code for that job. ServiceTitan inventory bills from received purchase orders sync into Microsoft Dynamics GP's AP accounts so vendor balances stay current. The sync runs on a schedule tied to your billing cycle (daily, weekly, or after each invoice batch). Reference data such as vendors, customers, and GL accounts are validated in both directions so every posted transaction lands on an account that exists in Microsoft Dynamics GP.

How ml-connector handles it

ml-connector stores ServiceTitan OAuth2 credentials and Microsoft Dynamics GP Windows domain account credentials encrypted, and uses OAuth2 to obtain ServiceTitan bearer tokens (cached for their 15-minute lifetime) while presenting Windows domain credentials for every Microsoft Dynamics GP SBA call. Since ServiceTitan's API exposes GL mapping only through the UI, ml-connector accepts a customer-maintained mapping table of ServiceTitan job codes and cost centers to Microsoft Dynamics GP GL accounts and departments. Before posting any journal entry into Microsoft Dynamics GP, it validates that the target GL account exists, the fiscal period is open, and the document number is unique (Microsoft Dynamics GP has no idempotency mechanism and rejects duplicates). ServiceTitan invoices are read via REST polling on your schedule, or via optional webhooks if enabled in your ServiceTitan Developer Portal. AP bills are read-only, so ml-connector never writes back to ServiceTitan inventory. If a Microsoft Dynamics GP GL post fails (closed period, missing account, or locked transaction), the record is held with a full audit trail and can be replayed when the issue is resolved.

A real-world example

A mid-sized HVAC contractor runs ServiceTitan for scheduling, dispatch, and field invoicing across five service branches, and uses Microsoft Dynamics GP for accounting, AP, and monthly financial reporting. Before the integration, the back-office manager received invoices and AP bills from ServiceTitan each week, manually looked up the correct GL account and cost center for each job, and re-entered the totals into Microsoft Dynamics GP by hand. Vendor reconciliation happened mid-month and took days of chasing mismatches. With ServiceTitan and Microsoft Dynamics GP connected, each completed job flows into the GL automatically with the right account coding, AP bills post without delay, and month-end close starts with vendor balances already reconciled.

What you can do

  • Post ServiceTitan invoices into Microsoft Dynamics GP's payables and receivables accounts, allocated to the correct GL account and cost code for each job.
  • Sync ServiceTitan inventory bills from received purchase orders into Microsoft Dynamics GP's AP, keeping vendor balances current.
  • Map ServiceTitan job codes and cost centers to Microsoft Dynamics GP GL accounts and departments so invoices land on valid accounts.
  • Bridge Windows Authentication on the Microsoft Dynamics GP side with ServiceTitan's OAuth2 credentials, handling token refresh and domain account persistence.
  • Poll ServiceTitan on a schedule tied to your billing cycle, with validation, audit trails, and full replay capability when Microsoft Dynamics GP posts fail.

Questions

Which direction does data move between Microsoft Dynamics GP and ServiceTitan?
The main flow is ServiceTitan into Microsoft Dynamics GP. Invoices and AP bills move from ServiceTitan into Microsoft Dynamics GP's GL, while vendors and customers are aligned in both directions. ServiceTitan AP bills are read-only, so ml-connector does not write inventory bills back to ServiceTitan. GL accounts are validated but never updated on either side.
How does ml-connector handle Microsoft Dynamics GP's Windows Authentication and ServiceTitan's OAuth2?
ml-connector stores both credential sets encrypted. For ServiceTitan it caches OAuth2 bearer tokens for their 15-minute lifetime and refreshes when a call returns 401. For Microsoft Dynamics GP it presents Windows domain credentials (Negotiate/Kerberos) on every SBA call, tied to a domain account with GP User role that your IT team creates in Active Directory and configures in Microsoft Dynamics GP.
How do GL accounts and job codes map between the two systems?
ServiceTitan does not expose GL accounts via API, so ml-connector accepts a customer-maintained mapping table of ServiceTitan job codes and cost centers to Microsoft Dynamics GP GL accounts and departments. Before posting any invoice, ml-connector validates the target account exists and the fiscal period is open in Microsoft Dynamics GP. If a post fails due to a closed period or missing account, the record is held with a full audit trail and can be replayed when the issue is resolved.

Related integrations

Connect Microsoft Dynamics GP and ServiceTitan

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started