Import Sales Orders into HaloPSA
This task will allow you to import sales order data into your HaloPSA platform based on the task settings and XML data provided.
Settings
Connection
Required
The HaloPSA connection to use. See Connecting to HaloPSA.
File Settings
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 HaloPSA. 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.
Import Settings
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
Examples
Sample input file:
<?xml version="1.0" encoding="utf-8"?>
<SalesOrders xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SalesOrder>
<Id>4</Id>
<Errors />
<TopLevelId xsi:nil="true" />
<CreatedDate xsi:nil="true" />
<ModifiedDate>2023-10-31T11:38:05.22</ModifiedDate>
<Title>New laptops required non-urgent x 5</Title>
<Status>9</Status>
<User>
<Id>43</Id>
<SiteId>21</SiteId>
<SiteName>Main</SiteName>
<SiteTelephone />
<ClientName>Tony's Tyre Emporium</ClientName>
<Firstname>Tony</Firstname>
<Surname>Biggles</Surname>
<Initials>TB</Initials>
<IsInactive>false</IsInactive>
<Colour>#0F61A1</Colour>
<IsImportant>false</IsImportant>
<IsImportant2>false</IsImportant2>
<ShouldNotSendEmails>false</ShouldNotSendEmails>
<ItemTaxCode xsi:nil="true" />
<PriorityId>0</PriorityId>
<LinkedAgentId>0</LinkedAgentId>
<IsCoveredByContract xsi:nil="true" />
<ContractValue xsi:nil="true" />
<RelationshipId xsi:nil="true" />
<UdUserId xsi:nil="true" />
<UdRoleCount xsi:nil="true" />
<IsServiceAccount>false</IsServiceAccount>
<ShouldIgnoreAutomatedBilling xsi:nil="true" />
<ConnectWiseId>0</ConnectWiseId>
<AutoTaskId>-1</AutoTaskId>
<ClientId>13</ClientId>
<AutoApplySalesTax xsi:nil="true" />
<ContractEndDate xsi:nil="true" />
</User>
<SiteId>21</SiteId>
<SiteName>Main</SiteName>
<ClientId>13</ClientId>
<ClientName>Tony's Tyre Emporium</ClientName>
<Currency>$</Currency>
<CurrencyCode>0</CurrencyCode>
<CurrencyConversionRate>1</CurrencyConversionRate>
<TotalTax>1200</TotalTax>
<Total>7200</Total>
<PercentageInvoiced>100</PercentageInvoiced>
<CreatedByAgentName>Joe Harrison</CreatedByAgentName>
<Use>salesorder</Use>
<ShouldPrintHtml xsi:nil="true" />
<ShouldCancelReserve xsi:nil="true" />
<IsValidateOnly xsi:nil="true" />
<ShouldShowPrintPreview xsi:nil="true" />
<ShouldCreatePo xsi:nil="true" />
<ShouldCreateInvoice xsi:nil="true" />
<CreateInvoicePercentage xsi:nil="true" />
<CreateInvoiceAmount xsi:nil="true" />
<CreateInvoiceQty xsi:nil="true" />
<ShouldReturnInvoice xsi:nil="true" />
<IsCopy xsi:nil="true" />
<PdfTemplateId xsi:nil="true" />
<TicketId xsi:nil="true" />
<ClientToInvoiceId>0</ClientToInvoiceId>
<OpenStatusId>12</OpenStatusId>
<Date>2023-09-26T11:44:28.333</Date>
<ShipmentDate>1902-07-24T00:00:00</ShipmentDate>
<ShipmentStatus />
<ReceivedDate>1902-07-24T00:00:00</ReceivedDate>
<Revenue>6000</Revenue>
<Cost>5000</Cost>
<Profit>1000</Profit>
<Note />
<PurchaseOrderNumber />
<CreatedByAgentId>3</CreatedByAgentId>
<DeliverBy xsi:nil="true" />
<SoldBy>0</SoldBy>
<Summary />
<AccountsReference />
<LeadSource>0</LeadSource>
<Canvasser>0</Canvasser>
<InvoiceDate>2023-09-26T12:00:00</InvoiceDate>
<InvoiceNumber />
<IncludeGroupedItemPrice>true</IncludeGroupedItemPrice>
<IncludeGroupedItemQuantity>true</IncludeGroupedItemQuantity>
<IncludeGroupedPriceQty>false</IncludeGroupedPriceQty>
<QuotationId>15</QuotationId>
<ConsignmentId>0</ConsignmentId>
<ShouldNotInvoice>false</ShouldNotInvoice>
<ShouldCloseWhenProcessed>false</ShouldCloseWhenProcessed>
<SalesOrderItems>
<SalesOrderItem>
<Id>1</Id>
<SalesOrderId>4</SalesOrderId>
<Sort>10</Sort>
<ItemId>9</ItemId>
<ProductCode />
<ItemExternalReference />
<Name>Laptop</Name>
<Price>1200</Price>
<TotalPrice>6000</TotalPrice>
<TotalNetTotal>7200</TotalNetTotal>
<TotalTax>1200</TotalTax>
<Tax>240</Tax>
<Quantity>5</Quantity>
<ItemTaxCode>0</ItemTaxCode>
<AssetTypeId>131</AssetTypeId>
<GroupId>0</GroupId>
<LineSiteId>-1</LineSiteId>
<SiteName />
<Note />
<ShouldSerialiseOnlyOne>false</ShouldSerialiseOnlyOne>
<PercentageInvoiced>100</PercentageInvoiced>
<InvoicedQuantity>5</InvoicedQuantity>
<AssetGroupName>Serialised</AssetGroupName>
<CostPrice>1000</CostPrice>
<TotalNet>1440</TotalNet>
<BasePrice>1200</BasePrice>
<Profit>200</Profit>
<ProfitPercentage>16.6666666666667</ProfitPercentage>
<QuantityShipped>0</QuantityShipped>
<QuantityReserved>0</QuantityReserved>
<TotalCostPrice>5000</TotalCostPrice>
<TotalProfit>1000</TotalProfit>
<TotalPriceYearOne>6000</TotalPriceYearOne>
<TotalNetTotalYearOne>7200</TotalNetTotalYearOne>
<TotalCostPriceYearOne>5000</TotalCostPriceYearOne>
<TotalProfitYearOne>1000</TotalProfitYearOne>
<TotalTaxYearOne>1200</TotalTaxYearOne>
<Unit>0</Unit>
<StockLocationId>19</StockLocationId>
<TotalQuantityInStock>0</TotalQuantityInStock>
<TotalQuantityReserved>0</TotalQuantityReserved>
<IsSelected>false</IsSelected>
<ServiceFee>-1</ServiceFee>
<Recovery>-1</Recovery>
<Margin>-1</Margin>
<PoQty>0</PoQty>
<BillingPeriod>0</BillingPeriod>
<StartDate>2021-03-04T11:34:02.52</StartDate>
<ShouldAutoRenew>false</ShouldAutoRenew>
<RecurringInvoiceId>0</RecurringInvoiceId>
<OverrideTaxCode>-1</OverrideTaxCode>
<IsItemRecurring>false</IsItemRecurring>
<IsItemContract>false</IsItemContract>
<ShouldNotConsign>false</ShouldNotConsign>
<SupplierPo />
<SupplierId>0</SupplierId>
<SupplierName />
<QuotationLineId>11</QuotationLineId>
<IsGroupDesc>false</IsGroupDesc>
<NominalCode />
<CostCentre>0</CostCentre>
<ProjectId>0</ProjectId>
<ContractId>0</ContractId>
<ContractRef />
<ShouldNotInvoiceLine>false</ShouldNotInvoiceLine>
<ItemDescription />
<ItemPurchaseDescription />
<ItemNote />
<ItemTaxName>No Tax</ItemTaxName>
<InvoiceId>0</InvoiceId>
<SoItemUrl />
<LinePeriods>0</LinePeriods>
<ShouldHideItems>false</ShouldHideItems>
<InvoiceIds>
<InvoiceId>3</InvoiceId>
</InvoiceIds>
<IsBundledLine>false</IsBundledLine>
<LineTicketId>0</LineTicketId>
</SalesOrderItem>
</SalesOrderItems>
<PurchaseOrdersCount>0</PurchaseOrdersCount>
<InvoicesCount>1</InvoicesCount>
<ShouldShowPercentageInvoiced>true</ShouldShowPercentageInvoiced>
<OutstandingTotal xsi:nil="true" />
<ProjectFaultId>0</ProjectFaultId>
<OrderProjectTemplateId>0</OrderProjectTemplateId>
<LinkedToOpoortunity>true</LinkedToOpoortunity>
<LinkedToProject>false</LinkedToProject>
<ShouldGeneratePrint xsi:nil="true" />
</SalesOrder>
</SalesOrders>