Connect D&H Distributing
D&H Distributing is an IT distributor, and this connector is about procurement: what a product costs you, whether it is in stock and at which warehouse, and where an order has got to. Connecting it…
Written By Christopher Scaminaci
Last updated 6 days ago
D&H Distributing is an IT distributor, and this connector is about procurement: what a product costs you, whether it is in stock and at which warehouse, and where an order has got to. Connecting it lets your AI assistant quote and buy without anyone opening dandh.com.
Connecting D&H to StackJack gives your AI assistant a family of dnh_ MCP tools — MCP (Model Context Protocol) tools are the standardized commands an AI assistant can call through StackJack. The generated D&H tool reference is the current inventory and plan assignment. With them, your AI can:
- Price — get your real-time, account-specific price for an item, or for up to 50 items in one call, including volume pricing at a given quantity
- Check stock — see availability broken down by distribution centre, with expected restock dates for anything out of stock
- Find products — look an item up by manufacturer part number, your own SKU, or UPC when you don't know the D&H item number
- Read product detail — descriptions, estimated retail price, rebate value and end date, and whether an item is non-stock, factory-direct, free-freight, or sales-restricted
- List carriers available to your account, so an order specifies a carrier D&H will actually accept
- Track orders — order status, per-line backorder quantities and ETAs, invoice totals broken out into tax, environmental handling, freight and handling, and package tracking numbers with the serial numbers in each box
- Place orders (on Pro plans) — submit a purchase order to D&H, with drop-shipping to your customer's address where your account is authorized for it
D&H has two services, and you can connect either or both
This is the one thing worth understanding before you start. D&H offers two independent integration services, with separate credentials, and StackJack works with either on its own or with both:
Connect whichever D&H has given you. Many accounts have XML access only, and that is a complete setup — nothing here requires the REST service. If you have both, connect both: they cover overlapping ground but each returns something the other doesn't.
- The XML service is D&H's own preferred surface and the more capable one for reading. Its item inquiry returns volume pricing, estimated retail price, rebate data, and the non-stock / factory-direct / free-freight / restricted flags. Its order status returns sold-to and ship-to addresses, per-line backorder quantities and ETAs, the full invoice breakdown, and per-package tracking with serial numbers. D&H publishes distinct United States XML automation guidance and a Canadian XML integration guide; StackJack supports both.
- The REST service adds product search — looking an item up by manufacturer part number, your own SKU, or UPC when you don't know the D&H item number — plus your account's carrier list and REST order submission. Its company selector supports United States, Canada, and DSC. DSC purchasing is REST-only.
Setting up the XML service
In StackJack, open Connectors, choose D&H Distributing → Configure, and fill in the DandH.com User Code and DandH.com Password — the same sign-in you use on dandh.com or dandh.ca. Select the matching XML Country so StackJack uses the correct fixed dispatch host and request vocabulary. Enter both or neither: a user code without a password (or the reverse) cannot authenticate, so StackJack rejects a half-filled pair rather than saving something that fails on first use.
The XML service identifies your account from the sign-in itself, so it needs no account number. If you're connecting the XML service only, leave the Client ID, Secret and account number empty.
Choosing Save validates every service you've filled in before the connector is stored. For an XML-only setup, a successful save means your dandh.com sign-in was accepted by D&H's XML endpoint. After setup, use Re-test on the configured connector card whenever you need to validate it again.
Setting up the REST service (optional)
- Sign in to the D&H API Portal at apiportal.dandh.com with your D&H account.
- Create an application. Open the Applications tab and choose Create Application. Fill in the details, tick the checkbox to the right of the Customer Order Management API, then choose Save and add authentication.
- Generate OAuth credentials. On the authentication screen, expand OAuth Credentials, choose Generate, then Generate Client. The application type defaults to Confidential, which is what you want. The dialog also offers Redirect URL and X.509 certificate fields — leave both blank. StackJack connects to D&H with the OAuth client-credentials flow, which uses no callback, so there is no redirect URL for you to fill in here.
- Copy the Client ID and Secret key. The Secret key is shown only once — copy it now. If you lose it, generate a new one.
- Find your account number. This is your 10-digit D&H account number, on your D&H invoices and in your dandh.com profile. If you're unsure which account to use — a main account or a subaccount — ask your D&H sales representative.
- Enter everything in StackJack. In the same configure dialog, enter the Client ID, Secret key, and account number. Pick the D&H company you buy from: United States, Canada, or DSC.
- Choose Save. StackJack validates the credentials, account number, and company selection before storing the connector. Use Re-test on the configured connector card for later checks.
Enter the Client ID, Secret and account number together, or leave all three empty. The REST service can't authenticate on a partial set, so StackJack rejects one rather than saving something that fails on first use.
Which plan gets which tools
Free includes the read-only pricing, availability, lookup, carrier, and tracking operations. Pro adds the order-submission operations; Business exposes the same operations as Pro with a higher monthly call allowance. For the exact current tool names and tiers, use the generated D&H tool reference.
Before your AI places an order
Order submission is the one thing here that spends money, and it deserves a moment's attention.
Orders cannot be undone through the API. D&H provides no way to cancel or change an order through either service. A mistaken order has to be sorted out with your D&H sales representative. Both order tools are marked as write actions. Whether your AI application asks you to confirm before running one depends on that application's own settings — see Destructive tools and confirmation. Check that your AI application is set to ask, and grant the order tools only where you want an AI to be able to place an order.
Purchase order numbers must be unique on your account. D&H rejects a repeated PO number rather than treating it as a resubmission of the same order. That's a safety feature — it means a retry can't accidentally place a duplicate order — but it also means a genuine retry needs a fresh PO number.
Confirm price and stock first. Ask your AI to check price and availability before ordering. Prices are account-specific and stock moves.
Watch the two fulfilment options. Every order can allow or disallow partial shipments and backorders. Both are allowed by default, which is usually what you want. Turning both off means D&H will not fill the order at all unless every item and quantity is available from a single warehouse — a combination that can cause an order to fail rather than ship partially.
Any special instruction puts the order on hold. If your AI includes a note or remark on an order, D&H routes it to a sales representative for manual review before processing. Useful when you mean it, surprising when you don't.
Things to know
Ordering, custom pricing, and drop-shipping are account entitlements. Your D&H account has to be enabled for each. If a tool reports that D&H refused the operation, that's usually the cause rather than a credential problem — ask your D&H sales representative to enable it.
Save and Re-test check every service you've connected, and only those. An XML-only connection is tested against the XML endpoint, a REST-only connection against the REST endpoint, and a connection with both has to pass both. A successful result means every configured service answered its validation request; a failure can mean invalid input, missing account entitlement, or a transient upstream problem, so use the returned detail before changing credentials. StackJack also re-checks saved credentials in the background and disables ones that keep failing; a service you never configured is not part of those checks.
Several REST accounts on one connection. REST tools accept optional account-number and company-code overrides, so one REST connection can serve a reseller working across multiple D&H accounts or companies. XML tools do not: they are bound to the saved DandH.com sign-in and XML Country.
Warehouse names differ by service and XML country. REST uses warehouse codes (BR01 Mid-Atlantic, BR03 Toronto, BR04 West Coast, BR05 Midwest, BR06 Atlanta, BR08 Vancouver). United States XML uses Harrisburg, California, Chicago, and Atlanta; Canadian XML uses Toronto and Vancouver. These values are not interchangeable. StackJack rejects a mismatch before transmitting an order and reports the values accepted for the configured surface.
Carrier and service values are checked before an order is sent. United States XML accepts Pickup, UPS, FedEx, or USPS and the services Pickup, Ground, 2nd Day Air, Next Day Air, FirstClassMail, PriorityMail, or Red Sat Del. Canadian XML accepts Pickup, FedEx, or Purolator and only Pickup, Ground, 2nd Day Air, or Next Day Air. The REST service uses its own service names and takes the carrier from the account's carrier list — use dnh_list_carriers. Capitalization does not matter. Catching a bad value locally is important because a submitted purchase-order number cannot be reused.
Expected ship date is a United States XML field. D&H's Canadian XML schema does not include it, so StackJack rejects an expected ship date on a Canadian XML order instead of silently dropping the instruction. Canadian XML also uses province/postal-code field names where the United States schema uses state/ZIP.
Troubleshooting
"D&H rejected the API credentials." The Client ID or Secret is wrong, or your application's access to the Customer Order Management API was removed. Sign in to the API Portal, open your application, confirm the Customer Order Management API is still ticked, and generate fresh OAuth credentials if needed.
"D&H refused this operation for the account requested." Usually the wrong account number, the wrong D&H company, or an account not entitled to what was attempted (ordering, custom pricing, or drop-shipping). Check the account number and company on the connector first, then check entitlements with your D&H representative.
"D&H rejected the request contents." On an order this is most often a duplicate purchase order number, an unknown item number, or a quantity that isn't available. Use a new PO number and confirm items and stock.
"D&H's XML service returned a web page instead of a response." Your dandh.com sign-in was rejected, or D&H is undergoing maintenance. Confirm the user code and password still work by signing in at dandh.com, and check the account is enabled for XML integration. Your REST tools are unaffected — they use separate credentials.
"D&H rejected the XML service credentials." Save or Re-test got a proper reply from D&H's XML endpoint, and the reply was a refusal — so the endpoint answered and the sign-in is the likely problem. D&H's own wording is included after the message. Confirm the user code and password by signing in at dandh.com, and check the account is enabled for XML integration.
"The D&H Distributing REST service is not configured for this tenant." Your AI called a REST tool on a connection that has only the XML service. Either use the XML equivalent (dnh_xml_get_price, dnh_xml_get_availability, dnh_xml_item_inquiry, dnh_xml_get_order_status) or add API Portal credentials to the connector. The reverse message names the XML service and means the opposite.
An item is priced but shows zero stock everywhere. Check the expected restock date the availability tools return, and whether the item is flagged non-stock or factory-direct — those ship from the manufacturer rather than a D&H warehouse, on a different timeline.
D&H Distributing tools
dnh_ · 18 tools · Free 16 · Pro 2
Items
Orders
XML Items
XML Orders
More in Connector guides
Connect Acronis Cyber Protect CloudConnect Action1Connect AddigyConnect AlertOpsStill need help? Ask the team