This document provides instructions and example code for DocketManager’s ImportQuoteRequest (IOR)API. DocketManager’s IOR allows external systems to send quotes to a DocketManager site. Using a post request DocketManager will parse the required XML and convert the provided information into the DocketManager MIS system.


PostURL

IOR post requests need to be sent to the following url:


Url: [DocketManagerSiteURL]/api/importquoterequest

SampleUrl: https://dmxml.docketmanager.net/api/importquoterequest


Note

Unique quote ID will be amended to "Imported Quote" for Order Name

i.e. Imported Quote - 123456790



XML Elements & Attributes


Element

Description

Required

ImportQuoteRequest

Root element
Attribute:Version=”1.0” (required)

*
ServiceInformation

Parent element
Information about the service sending the post request

*
ServiceName

Service Name,Version Number etc.

*
ServiceUrl

URL the request was sent from

*
ServiceTransactionId

Unique Identifier for the quote/request (for auditing purposes)

*
Authentication Key
Unique key that must match your system key.

NOTE: Not currently required but will be in the near future

Customer

Parent element
Information about the Customer

*
CustomerId

Unique Identifier for the Customer 

NOTE: If this identifier matches an External Identifier on a customer on the DocketManager site, the quote will be created for that customer. If there is no match, a new customer will be created.
*
Name

Customer name

*
Phone

Customer phone number



Email

Customer email address



ContactName 

Contact name

NOTE: Will try to find a contact belonging to the customer based on a name, phone number and email match, and will create a new one if no full match is found.

*
ContactPhone 

Contact phone number


ContactEmail 

Contact email address

*
ShippingLocation 

Parent element
Shipping Location information


Note: If no shipping location is provided, the system will use the default shipping location on the contact. If the contact does not have a default shipping location, it will use the customer's default shipping location. If the customer does not have a default shipping location, the quote shipping location will be left blank.
If the customer is new, any values provided will be set as the customer's default shipping location. 


AddressName

Shipping address name

Note: This is a "name" that describes the address. 
i.e the customer name, default shipping address, location 1, etc.

Address 

Shipping address



City 

Shipping city


PostalZipCode 

Shipping postal / zip code



ProvinceState 

Shipping province/state



Country 

Shipping country


ShippingMethod

ShippingType

Note: Will try to find a shipping type based on a name match. This value will also be imported in a shipping note on the quote

BillingLocation

Parent Element
Billing Location information


Note: If no billing location is provided, the system will use the default billing location on the contact. If the contact does not have a default billing location, it will use the customer's default billing location. If the customer does not have a default billing location, the quote billing location will be left blank.
If the customer is new, any values provided will be set as the customer's default billing location.

AddressName

Billing address name

Note: This is a "name" that describes the address. 
i.e the customer name, default billing address, head office, etc.


Address

Billing address
City

Billing city
PostalZipCode

Billing postal / zip code
ProvinceState

Billing province/state
Country

Billing country
Quote

Parent element
Information pertaining to the Quote

*
QuoteId 

Unique Identifier for the Quote

*
QuoteDate

Date the quote was placed (M/d/yyyy h:mm:sstt)

*
Name

Order name
GenericNote
Quote generic note


PurchaseOrderNumber

PO number


ShippingTotal 

Shipping total for the quote

*
SubTotal

Sub total for the quote
Should equal the sum of the Item (ItemTotal+ ShippingTotal)

*
TaxTotal

Tax total for the quote

*
TaxPercentage

Tax percentage used to calculate the Tax Total

*
GrandTotal 

Grand Total for the Quote
Should equal Sub Total+Tax Total

*
Items

Parent element
List of Items

*
ItemTotal

Item’s total price
This will be the overridden price of the item

*
Quantity

Item quantity
This will be the selected quantity on the item.

*
Item Name

Item name
This will amend to the end of the current name of the product.


Item Code

Item product code (Unique Identifier from the requesting service)

Note: A Product with an external identifier (on the Online Tab of the Product) matching this item product code must be present in the DocketManager site receiving the post request.

*
Description

Item description
This will amend to the end of the current description of the product.



StockName

Paper stock name and description
e.g. Bond blue 24lb offset
This will be included in the press note.



RunSize
Item run size
Both values are required if used.
Replaces current run size values
e.g. 8.5x11



FlatSize
Item flat size
Both values are required if used.
Replaces current flat size values
e.g. 8.5x11



FinishSize 

Item finish size
e.g. 8.5x11

This will be included in the press note.



ColorProcess 

Print color process
e.g. 4/4

This will be included in the press note.



ColorName 

Ink color names
e.g. Reflex Blue, Pantone Metallic 8783C

This will be included in the press note.



ColorCode

Ink color code
PMS Reflex Blue, 8783

This will be included in the press note.



PressNote

General print/press notes & printing instructions



ArtworkNote 

General graphic/artwork notes & instructions



DownloadUrl 

URL to art work file (will be downloaded)




* Note the required elements and attributes


Response

Once a post request is sent a simple string response is returned depending on the outcome of the request.


The Response message is sent in the following format.

Success=[True/False]|Message=[ReturnedMessage]


Example Responses:


Succeeded

  • Success =True|Message=This Quote has been successfully imported as Quote# 1279
Failed
  • Success = False|Message = ImportQuoteRequest - Failed: Could no timport this quote because Quote# 1279 already exists with the external Quote ID '115067326'. It appears that it has already been imported (ValidationException)
  • Success = False|Message = Import Quote Request - Failed : Failed to deserialize input, this is the error occurred: YAXLib. YAX Attribute Missing Exception:Noattributeswiththisnamefound:'./Version'.


Example XML:


The following is an example of the xml structure which includes all required and optional elements:

<?xml version="1.0" encoding="UTF-8"?> 

<ImportQuoteRequest Version="1.0"> 

<ServiceInformation>

<ServiceName>ExternalService</ServiceName> 

<ServiceUrl>http://google.com</ServiceUrl

<ServiceTransactionId>123456</ServiceTransactionId>

</ServiceInformation>

<Customer>

<CustomerId>1</CustomerId>

<Name>Test Customer 1</Name>

<Phone>123-456-7890</Phone>

<Email>democompany@democompany.com</Email>

<ContactName>DemoContact</ContactName>

<ContactPhone>123-456-7890</ContactPhone>

<ContactEmail>democontact@democompany.com</ContactEmail>

</Customer>

<ShippingLocation>

<AddressName>Shipping Address</AddressName>

<Address>123FakeSt.</Address>

<City>SanFrancisco</City>

<PostalZipCode>94124</PostalZipCode>

<ProvinceState>California</ProvinceState>

<Country>USA</Country>

<ShippingMethod>Fedex</ShippingMethod>

</ShippingLocation>

<BillingLocation>

<AddressName>Billing Address</AddressName>

<Address>123FakeSt.</Address>

<City>SanFrancisco</City>

<PostalZipCode>94124</PostalZipCode>

<ProvinceState>California</ProvinceState>

<Country>USA</Country>

</BillingLocation>

<PurchaseOrderNumber>1234567890</PurchaseOrderNumber>

<Quote>

<QuoteId>156350719</Quote>

<QuoteDate>7/21/2023 01:14:18 PM</QuoteDate>

<QuoteName> Quote#1234 - Cards</QuoteName>

<GenericNote>Quote to completed</GenericNote>

<ShippingTotal>19.99</ShippingTotal>

<SubTotal>519.99</SubTotal>

<TaxTotal>39.00</TaxTotal>

<TaxPercentage>7.5</TaxPercentage>

<GrandTotal>558.99</GrandTotal>

<Items>

<Item>

<ItemTotal>350.00</ItemTotal>

<Quantity>10000</Quantity>

<ItemName>BizCards</ItemName>

<ItemCode>1001</ItemCode>

<Description>Fullcolorbusinesscards</Description>

<StockName>BondThick</StockName>

<FinishSize>3.5x2</FinishSize>

<ColorProcess>4/4</ColorProcess>

<ColorName>CMYK</ColorName>

<ColorCode>CMYK</ColorCode>

<PressNote>Runthis12up</PressNote>

<ArtworkNote>Noedits required,thanks.</ArtworkNote>

<DownloadUrl>https://dmxml.docketmanager.net/Crm/Customers/CustomerView.aspx?Id=0939f8bb-bb4b-4038-933f-9ce258a48bf3</DownloadUrl>

</Item>

<Item>

<ItemTotal>150.00</ItemTotal>

<Quantity>1000</Quantity>

<ItemName>PostCardSmall</ItemName>

<ItemCode>1002</ItemCode>

<Description>Simplesmallpostcards</Description>

<StockName>PostCardStock</StockName>

<FinishSize>6x4</FinishSize>

<ColorProcess>4/1</ColorProcess>

<ColorName>CMYK,PMS151</ColorName>

<ColorCode>CMYK,151</ColorCode>

<PressNote />

<ArtworkNote>Pleaseupdatethesaledateinformation</ArtworkNote>

<DownloadUrl>https://dmxml.docketmanager.net/Crm/Customers/CustomerView.aspx?Id=0939f8bb-bb4b-4038-933f-9ce258a48bf3</DownloadUrl>

</Item>

</Items>

</Quote>

</ImportQuoteRequest>