Importing Sales Invoices into Sage 50 US
This task will import sales invoice information in the Sage 50 US Sales Invoice XML format into Sage 50 US. It supports both the creation of new sales invoices, and the update of existing sales invoices in Sage.
Settings
Sage Connection
Required
The connection to Sage 50 US to use. See the Connecting to Sage 50 US article if you require more information on how to create/manage connections.
Auto Create Customers
Required
Set to True to automatically create customer accounts if they don't already exist in Sage, if False and the customer does not exist the import will fail. Defaults to True.
Auto Generate Account IDs
The following settings allow you to automatically generate IDs for each customer/vendor, when not specified in the input file.
Alphabetic Length
Required
The number of characters to take from the name field as part of the ID. Defaults to 20.
The total value of the 'Alphabetic Length' and 'Numeric Length' properties cannot exceed 20.
Auto Generate IDs
Required
Set this to True to automatically generate an ID for each account if it isn't specified in the input file. The ID will be generated based on the name field. Defaults to True.
Mask
Optional
The mask to apply to the generated ID. For example, A?????? will prefix the ID with the letter A.
Numeric Length
Required
The number of digits to append to the end of the ID, to ensure uniqueness. This can be useful when multiple customers/vendors have similar names, that would result in the same IDs being generated. Defaults to 0.
The total value of the 'Alphabetic Length' and 'Numeric Length' properties cannot exceed 20.
Regular Expression
Optional
The regular expression to use for stripping out any undesired characters from the generated ID. For example, \s* can be uses to strip out spaces.
Match Customers On
Optional
Allows you to specify one or more fields to use for matching to existing customers in Sage during the import, if no match is found a new customer will be created. The following fields are supported: -
- Name
- AccountNumber
- CashAccountReference
Fail File
Required
The name of a file for "failed" imports to be sent to. Defaults to sage_50_us_import_sales_invoices_fail.xml.
Input File
Required
The source file that you want to import in XML format. Defaults to (Output from previous task).
Success File
Required
The name of a file for "successful" imports to be sent to. Defaults to sage_50_us_import_sales_invoices_success.xml.
Auto Create Inventory Items
Required
Set to True to automatically create inventory items if they don't already exist in Sage. If False and the item specified does not exist, the import will fail. Defaults to False.
Note
The creation of items in Sage requires the use of the COM interface. So when this setting is enabled, you will need to provide a Company Username and Company Password in your Sage 50 US connection, if user security is enabled in Sage.
Auto Generate Reference Numbers
Required
Optionally enable this setting to use the next available invoice number based on your Sage settings.
Prevent Reprocessing
Required
Set this to 'True' to check whether the supplied sales invoice Id has already been imported, and if so skip the sales invoice.
Use Item GL Account
Optional
Set to true to pick up the GL account reference from the inventory item, if not specified in the input file.
Zynk Settings
See Common Task Settings.
Example
A sample input file is shown below. See Sage 50 US Sales Invoice XML for full documentation of the XML format.
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfSalesInvoice xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SalesInvoice Operation="Create">
<ExternalId />
<Key>02dd69a9-5bad-415e-9112-2fc0ef76b762</Key>
<ReferenceNumber />
<Date>2020-03-15T00:00:00</Date>
<Amount>499.86</Amount>
<LastSavedAt>2010-03-14T23:25:18</LastSavedAt>
<IsPosted>true</IsPosted>
<AccountReference>11000-00</AccountReference>
<ShipToAddress>
<Name />
<Address>
<Address1 />
<Address2 />
<City />
<State />
<Zip />
<Country />
<SalesTaxCode />
</Address>
</ShipToAddress>
<ShipVia>None</ShipVia>
<TermsDescription>2% 10, Net 30 Days</TermsDescription>
<InternalNote />
<DiscountAmount>10.0000000000000000000</DiscountAmount>
<CustomerReference>HOLLAND</CustomerReference>
<CustomerPurchaseOrderNumber />
<DiscountDate>2020-03-25T00:00:00</DiscountDate>
<SalesTaxAmount>0.00</SalesTaxAmount>
<SalesTaxCodeReference>GACOBB</SalesTaxCodeReference>
<FreightAmount>0</FreightAmount>
<FreightAccountReference>57500-00</FreightAccountReference>
<PrintCustomerNoteAfterLineItems>false</PrintCustomerNoteAfterLineItems>
<CustomerNote />
<StatementNote />
<Customer>
<IsInactive xsi:nil="true" />
<Balance>0</Balance>
<CustomFields />
<Contacts />
<LastInvoiceDate xsi:nil="true" />
<LastInvoiceAmount>0</LastInvoiceAmount>
<LastPaymentDate xsi:nil="true" />
<LastPaymentAmount>0</LastPaymentAmount>
<UseEmailToDeliverForms xsi:nil="true" />
<ReplaceInventoryItemIDWithUPC xsi:nil="true" />
<ReplaceInventoryItemIDWithPartNumber xsi:nil="true" />
<Terms>
<ChargeInterest xsi:nil="true" />
<CreditLimit xsi:nil="true" />
<DiscountDays xsi:nil="true" />
<DiscountPercent xsi:nil="true" />
<DueDays xsi:nil="true" />
<IsStandardTerms xsi:nil="true" />
<PaymentTimeFrame xsi:nil="true" />
<UseDiscounts xsi:nil="true" />
</Terms>
<LastSavedAt xsi:nil="true" />
<IsProspect xsi:nil="true" />
<BillToContact>
<Gender xsi:nil="true" />
<NameToUseOnForms xsi:nil="true" />
<Address />
</BillToContact>
<ShipToContact>
<Gender xsi:nil="true" />
<NameToUseOnForms xsi:nil="true" />
<Address />
</ShipToContact>
<CustomerSince xsi:nil="true" />
<AverageDaysToPayInvoices xsi:nil="true" />
<LastStatementDate xsi:nil="true" />
<CreditStatus xsi:nil="true" />
<PhoneNumbers />
</Customer>
<DropShop>false</DropShop>
<SalesInvoiceLines>
<SalesInvoiceLine>
<AccountReference>40000-LS</AccountReference>
<Amount>199.96</Amount>
<Description>Weekly Landscaping Service</Description>
<IsUsed>true</IsUsed>
<InventoryItemReference>LAND-17100</InventoryItemReference>
<JobReference>BEATTY</JobReference>
<Quantity>4.00</Quantity>
<UnitPrice>50</UnitPrice>
<SalesTaxType>2</SalesTaxType>
</SalesInvoiceLine>
<SalesInvoiceLine>
<AccountReference>40000-LS</AccountReference>
<Amount>299.90</Amount>
<Description>Group Prep and Cultivation Service</Description>
<IsUsed>true</IsUsed>
<InventoryItemReference>LAND-17700</InventoryItemReference>
<JobReference>BEATTY</JobReference>
<Quantity>10.00</Quantity>
<UnitPrice>30</UnitPrice>
<SalesTaxType>2</SalesTaxType>
</SalesInvoiceLine>
</SalesInvoiceLines>
<InvoiceType>Invoice</InvoiceType>
<DateDue>2020-04-14T00:00:00</DateDue>
</SalesInvoice>
</ArrayOfSalesInvoice>