Documentation Summary

Tharstern Integration

Web Service Calls

Web Service Examples

The examples below describe how Storefront fields are mapped in the XML packets sent to Tharstern:

OrderRequestHeader > BillTo > AddressIDThis is the "Tharstern Account ID" field of the current user or the main "Account Code" specified in the extension configuration
OrderRequestHeader > ShipTo > NameThe value of the Storefront field specified in "DeliveryAddressMappings > Company Name" in the extension configuration
OrderRequestHeader > ShipTo > AddressThe values of the Storefront fields specified in the remaining "DeliveryAddressMappings" fields in the extension Configuration
OrderRequestHeader > Shipping > MoneyThe sum of the Shipping and Handling Charges
OrderRequestHeader > Shipping > DescriptionThe Delivery Method selected for the order in Storefront
OrderRequestHeader > TaxThe VAT on Shipping
OrderRequestHeader > ContactThe values of the ShippingFirstName and ShippingLastName Storefront fields for "enduser" Contact element. For "buyer" Contact element it uses UserProfileFirstName, UserProfileLastName and UserProfileEmailAddress of the owner of the order.
OrderRequestHeader > Extrinsic name="CustomerRef2"The Purchase Order Number when order is paid by purchase order, or SagePay transaction ID when the order paid in SagePay
ItemOut > ItemID > SuppliePartAuxiliaryIDThe Storefront document ExternalID
ItemOut > ItemDetail > DescriptionThe Storefront document Description
ItemOut > ItemDetail > UnitPriceThe price of one unit of the document
ItemOut > ItemDetail > Extrinsic name="section.XXXX"An optional field as explained in Section Extrinsics
ItemOut > TaxThe VAT on the document price

The XML when an order is sent can be viewed in the order logs as long as the ‘Logging Level’ is set to ‘Default’ or higher.


Method

SendOrder

Description

Sends the order to Tharstern.

Arguments

XML String

Example Request XML

<?xml version="1.0" encoding="ISO8859-1" >
<cXML>
<Request>
<OrderRequest>
<OrderRequestHeader orderID="G00001612">
<BillTo>
 <AddressaddressID="TEST001" />
 </BillTo>
 <ShipTo>
 <Address>
 <Name en-UK="en-UK">ABC Company</Name>
 <PostalAddress>
 <Street>Sample Corp.</Street>
 <City>London</City>
 <State>1 Sample St.</State>
 <PostalCode>12345</PostalCode>
 <Country>GB</Country>
 </PostalAddress>
 </Address>
 </ShipTo>
 <Shipping>
 <Money currency="GBP">10.52</Money>
 <Description xml:lang="en-UK">Custom_02</Description>
 </Shipping>
 <Tax>
 <Money currency="GBP">2.10</Money>
 <Description>Shipping Tax</Description>
 <TaxDetail purpose="shipping" percentageRate="20">
 <TaxAmount>
 <Money currency="GBP">2.10</Money>
 </TaxAmount>
 </TaxDetail>
 </Tax>
 <Contact role="enduser">
 <Name>Pat Sampleton</Name>
 <Email/>
 </Contact>
 <Contact role="buyer">
 <Name>John Doe</Name>
 <Email>John.Doe@sample.com</Email>
 </Contact>
 <Extrinsic name="CustomerRef2">77777</Extrinsic>
 <Extrinsic name="CreateOrder">Yes</Extrinsic>
 </OrderRequestHeader>
 <ItemOut quantity="1" lineNumber="1">
 <ItemID>
 <SupplierPartID>ROIBROC</SupplierPartID>
 <SupplierPartAuxiliaryID>D00001779</SupplierPartAuxiliaryID>
 </ItemID>
 <ItemDetail>
 <Description>Sports Plus Brochure (PDF)</Description>
 <UnitPrice>
 <Money currency="GBP">1.33</Money>
 </UnitPrice>
 <UnitOfMeasure/>
 <Extrinsic name="OOSOrderLineID">779</Extrinsic>
 <Extrinsic name="section.Text">
 <Extrinsic name="FinishedSize">A5</Extrinsic>
 </Extrinsic>
 </ItemDetail>
 <Tax>
 <Money currency="GBP">0.27</Money>
 </Tax>
 </ItemOut>
 <ItemOut quantity="100" lineNumber="2">
 <ItemID>
 <SupplierPartID>ROIBC</SupplierPartID>
 <SupplierPartAuxiliaryID>D00001780</SupplierPartAuxiliaryID>
 </ItemID>
 <ItemDetail>
 <Description>BusinessCard</Description>
 <UnitPrice>
 <Money currency="GBP">0.21</Money>
 </UnitPrice>
 <UnitOfMeasure/>
 <Extrinsic name="OOSOrderLineID">780</Extrinsic>
 <Extrinsic name="AssetURL">Required</Extrinsic>
 <Extrinsic name="section.Cover">
 <Extrinsic name="FinshedSize">A4</Extrinsic>
 </Extrinsic>
 </ItemDetail>
 <Tax>
 <Money currency="GBP">4.20</Money>
 </Tax>
 </ItemOut>
 </OrderRequest>
 </Request>
 </cXML>

 

Example Response XML

<?xml version="1.0" encoding="ISO8859-1" ?>
<cXML>
 <Response>
 <StatusTharsternCustomerContactID="170" TharsternCustomerDeliveryID="TEST001-005" TharsternCustomerAccountID="TEST001" TharsternOrderNo="1877" TharsternOrderID="1924" OOSOrderID="G00001612" text="Accepted" code="201" />
 <ResultList Count="2">
 <ConfirmationItem TharsternOrderLineID="3878" LineNumber="1" OOSOrderLineID="779">
 <Deliveries/>
 <Invoices/>
 <ConfirmationStatustype="Accepted" Status="Accepted" />
 </ConfirmationItem>
 <ConfirmationItem TharsternOrderLineID="3879" LineNumber="2" OOSOrderLineID="780">
 <Deliveries/>
 <Invoices/>
 <ConfirmationStatustype="Accepted" Status="Accepted" />
 </ConfirmationItem>
 </ResultList>
 </Response>
 </cXML>

 



Method

SubmitAssets

Description

Sends the URL of the rendered artwork to Tharstern.

Arguments

XML String

Example Request XML

<?xml version="1.0" encoding="ISO8859-1" ?>
<Request>
<OrderRequest>
 <OrderRequestHeaderorderID="G00001612" TharsternOrderID="1924" />
<ItemOut lineNumber="2" TharsternOrderLineID="3879">
 <ItemDetail>
 <Extrinsic name="AssetURL">http://output.roi360.co.uk/d1827/1/d1827_1.pdf</Extrinsic>
 <Extrinsic name="AssetDeliveryComplete">Yes</Extrinsic>
 </ItemDetail>
 </ItemOut>
 </OrderRequest>
 </Request>

 

Example Response XML

<?xml version="1.0" encoding="ISO8859-1" ?>
<cXML timestamp="2015-04-01T16:26:05.8709016+01:00" version="1.2.014">
<Response>
 <Statuscode="201" orderID="G00001612" text="Accepted" />
 </Response>
 </cXML>

 



Method

GetCustomerProducts

Description

Returns list of Tharstern customer product records.

Arguments

String[32]; representing the Tharstern Customer Account Code

Example Response XML

<?xml version="1.0" encoding="utf-8" ?>
 <Response>
 <Statuscode="201" text="Accepted" />
 <ResultList count="2">
 <ItemOut>
 <ItemID>
 <SupplierPartID>A58PPBKLT</SupplierPartID>
 </ItemID>
 <ItemDetail>
 <Description>A5 8Page Booklet</Description>
 <UnitPrice>165.99</UnitPrice>
 <UnitOfMeasure>/1000</UnitOfMeasure>
 </ItemDetail>
 <ItemStatus>
 <Balance>15000</Balance>
 <Available>10000</Available>
 <Projected ProjectedDate="2011-06-03T00:00:00+07:00">50000</Projected>
 <LeadTime>14</LeadTime>
 </ItemStatus>
 </ItemOut>
 <ItemOut>…</ItemOut>
 </ResultList>
 </Response>

 



Method

GetCustomerAccountList

Description

Returns list of Tharstern customer account records

Arguments

String[32]; representing the Tharstern Customer Account Code

Example Response XML

<?xml version="1.0" encoding="utf-8" ?>
 <Response>
 <Statuscode="201" text="Accepted" />
 <ResultList count="3">
 <Address addressID="AFC001">
 <Name xml:lang="en-UK">Applied Funicular Components Limited</Name>
 <PostalAddress>
 <Street>Belvedere Road</Street>
 <City>Burnley</City>
 <State>Lancashire</State>
 <PostalCode>BB3 2FB</PostalCode>
 <Country>United Kingdom</Country>
 </PostalAddress>
 <Phone name="Office">
 <TelephoneNumber>
 <Number>01282 860660</Number>
 </TelephoneNumber>
 </Phone>
 <Phone name="Fax">
 <TelephoneNumber>
 <Number>01282 860760</Number>
 </TelephoneNumber>
 </Phone>
 </Address>
 <Address addressID="FED001">…</Address>
 <Address addressID="DEC032">…</Address>
 </ResultList>
 </Response>

 



Method

GetCustomerDeliveryList

Description

Returns list of Tharstern customer contact records

Arguments

String[32]; representing the Tharstern Customer Account Code

Example Response XML

 

<?xml version="1.0" encoding="utf-8" ?>
 <Response>
 <Statuscode="201" text="Accepted" />
 <ResultList count="3">
 <Address addressID="AFC002">
 <Name xml:lang="en-UK">Applied Funicular Components (Peterborough) Ltd</Name>
 <PostalAddress>
 <Street>Unit 3</Street>
 <Street>Park West Industrial</Street>
 <City>Peterborough</City>
 <State>Cambridgeshire</State>
 <PostalCode>PE8 3GB</PostalCode>
 <Country isoCountryCode="GB">United Kingdom</Country>
 </PostalAddress>
 <Phone name="Office">
 <TelephoneNumber>
 <Number>01733 860660</Number>
 </TelephoneNumber>
 </Phone>
 </Address>
 <Address addressID="AFC003">
 <Name xml:lang="en-UK">AFC (Exeter) Limited</Name>
 <PostalAddress>
 <Street>Abbeyfield Trading Estate</Street>
 <City>Exeter</City>
 <State>Devon</State>
 <PostalCode>EX1 3FV</PostalCode>
 <Country>United Kingdom</Country>
 </PostalAddress>
 </Address>
 <AddressaddressID="AFC002" />
 </ResultList>
 </Response>