Skip to content

Import Purchase Orders Into Zahara

This task will create new or update existing purchase orders in Zahara, based on data provided via an XML file.

Settings

Connection

Required
Select the Zahara connection you want to use. See Connecting to Zahara.

Fail File

Required
The XML file to save failed records to. The XML format will be the same as the input file.

Input File

Required
The XML file containing records to import into Zahara. An example of the XML format is shown below.

Success File

Required
The XML file to save successful records to. The XML format will be the same as the input file.

Cache Time To Live

Required
Zynk will cache the IDs of records that it looks up against Zahara, to prevent the same lookup being performed more than is necessary. This setting controls the length of time (in minutes) cached IDs are considered valid for. The cached copy of the ID will be re-used until the amount of time specified has elapsed. Once it runs out, the lookup will be performed against Zahara the next time it is needed.

Prevent Reprocessing

Required
Set to true to prevent the same records being processed more than once, based on the value of the <ExternalId> element in the XML.

Zynk Settings

See Common Task Settings

Examples

A sample input file is shown below.

<?xml version="1.0" encoding="utf-8"?>
<PurchaseOrders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <PurchaseOrder>
    <Id>23539045</Id>
    <ExternalId>5230</ExternalId>
    <Address>
      <AddressId>32164258</AddressId>
      <AddressLines>Zynk Software Ltd,
6-8 Charlotte Square,
Newcastle upon Tyne</AddressLines>
      <Postcode>NE1 4XF</Postcode>
      <CountryCodeId>77</CountryCodeId>
      <CountryCode>gb</CountryCode>
      <AddressType>4</AddressType>
      <IsPrimary>false</IsPrimary>
      <Void>false</Void>
    </Address>
    <RequisitorId>145724</RequisitorId>
    <RequisitorUserName>[email protected]</RequisitorUserName>
    <PurchaseOrderNumber>00786</PurchaseOrderNumber>
    <TotalNetValue>29.210000000000000000</TotalNetValue>
    <TotalGrossValue>35.052000000000000000</TotalGrossValue>
    <RequiredDate>2025-10-01T00:00:00Z</RequiredDate>
    <BusinessDivisionId>167127</BusinessDivisionId>
    <BusinessDivisionName>Product</BusinessDivisionName>
    <SupplierId>3119131</SupplierId>
    <Supplier>
      <ExternalId>5230</ExternalId>
      <ReferenceNumber>ZYNK0001</ReferenceNumber>
    </Supplier>
    <Type>1</Type>
    <Status>5</Status>
    <Void>false</Void>
    <LineItemMatchType>0</LineItemMatchType>
    <ProcessId>327774</ProcessId>
    <ProcessStatus>4</ProcessStatus>
    <ProcessToken>358c4b44-7ef7-4254-86f4-7e320827a3c3</ProcessToken>
    <CurrentStepIndex>1</CurrentStepIndex>
    <CurrentStepKey>4afbf30f8d257209f25bcad8ef8738f213bd1b8c7dc572274e91ab0d3b28960a</CurrentStepKey>
    <SecondaryOrderRef>101156</SecondaryOrderRef>
    <LineItems>
      <LineItem>
        <LineItemId>31640964</LineItemId>
        <CostCodeId>311208</CostCodeId>
        <CostCode>Product</CostCode>
        <OrderNumber>00786</OrderNumber>
        <Quantity>1.0</Quantity>
        <Price>29.210000000000000000</Price>
        <Description>HP Care Pack Onsite Support</Description>
        <NominalCodeId>1225149</NominalCodeId>
        <NominalCode>5000</NominalCode>
        <TaxCodeId>266532</TaxCodeId>
        <TaxCode>VAT</TaxCode>
        <TaxPercentage>20.000000000000000000</TaxPercentage>
        <TaxValue>5.842000000000000000</TaxValue>
        <NetValue>29.210000000000000000</NetValue>
        <QuantityReceived>0.0</QuantityReceived>
        <ProductCode>HPCP0001</ProductCode>
        <DiscountPercentage>0.0</DiscountPercentage>
        <MatchType>0</MatchType>
        <CustomCodingFieldValues>
          <CustomCodingFieldValue>
            <CustomCodingFieldTypeId>1046</CustomCodingFieldTypeId>
            <Value>12345678</Value>
          </CustomCodingFieldValue>
        </CustomCodingFieldValues>
      </LineItem>
    </LineItems>
    <ReprocessCount>0</ReprocessCount>
    <SentToSupplier>false</SentToSupplier>
    <EverSentToSupplier>false</EverSentToSupplier>
    <GeneratedFromPr>false</GeneratedFromPr>
    <SendToSupplierFailed>false</SendToSupplierFailed>
    <BasePurchaseOrderNumber>00786</BasePurchaseOrderNumber>
    <CurrencyId>1</CurrencyId>
    <CurrencyShortName>GBP</CurrencyShortName>
    <CurrentExportMessage />
    <ExportedTo>0</ExportedTo>
    <CurrentExportType>0</CurrentExportType>
    <CurrentExportStatus>0</CurrentExportStatus>
    <Exported>false</Exported>
    <ExportedByWorkflow>false</ExportedByWorkflow>
    <PriorityApprovalDocument>false</PriorityApprovalDocument>
    <CustomFieldValues>
      <CustomFieldValue>
        <TypeId>6920</TypeId>
        <Label>Sage PO Number</Label>
        <Value>0000010864</Value>
      </CustomFieldValue>
    </CustomFieldValues>
  </PurchaseOrder>
</PurchaseOrders>