The Import module provides an infrastructure for mapping and importing data into QBO. Import FrameworkThe import framework is a series of patterns and methods that allow importing of any QBO data via XML. This is the most flexible method of automating data ingestion into a QBO system. There are other methods, and the IImport interface allows you to create new classes to handle your own methods of data ingestion and ETL. IImport interfaceThere are a variety of ways to import data into SQL server, and the IImport interface provides the scaffolding to support all of them. The three most common methods are:
Remote MonitoringA typical use case is remote monitoring of a FTP site for file to import. For example: ImportFile.ashx/Queue/Watch?FileObject=SomeClientFtpSite&Path=/Outbound&Pattern=*.csv&TemplateID=X&Schedule=Daily at 3am will create a job to check the FTP site configured in SomeClientFtpSite every day at 3 am. When invoking the watch method, an ImportFile record will be created for each file in the target location. By default, the file will be copied to the 'Database' FileObject (in case SQL Server needs to read it directly), and the original file will be deleted from the target location. Parameters available to this method include:
The sequence of execution is:
PackagesPackages are QBO 3 'add-ons' that provide pre-configured functionality in QBO 3. Package files are simply QBO 3 compliant XML files that pre-seed data and configuration entries to rapidly set up functionality. For example, the Compliance package will install the data and configuration required to manage compliance audits for attorneys in the mortgage space. To view packages available for install, navigate to Design > Configuration > Packages ( Import/ImportFile.ashx/PackageList ).To install a packages, click on the name of the package. Creating packages Developers can create packages by:
Note that custom configuration components (statements, filters, file objects, etc.) should be part of the Setup XML file, so they are stored in the ConfigurationEntry table instead of 'polluting' the core configuration files. See Source: Theme.Compliance.csproj for an example package. Bulk Applying a Method SignatureThe import module's ImportFile class includes an Apply method that supports applying a method signature to all rows returned by a query. Examples include: // Add a message to all Contacts with a Beverly Hills zip code Apply.ashx/Contact/Search?PostalCode=90210&Signature=Message/Save?Object=Contact%26&ObjectID={ContactID}&Subject=Welcome to the Jungle, {FirstName} - or - ImportFile.ashx/Apply?ClassName=Contact&Operation=Search& PostalCode=90210&Signature=Message/Save?Object=Contact%26&ObjectID={ContactID}&Subject=Welcome to the Jungle, {FirstName} // Launch a workflow for Loans with a UPB of more than $1M Apply.ashx/Loan/Search?UPBAmount>=1000000&Signature=Decision/Save?Object=Contact%26&ObjectID={LoanID}&Template=High Risk Loan Analysis - or - ImportFile.ashx/Apply?ClassName=Loan&Operation=Search&UPBAmount>=1000000&Signature=Decision/Save?Object=Contact%26&ObjectID={LoanID}&Template=High Risk Loan Analysis Notes:
The Import module's commonly used status values include:
|