Sending Financial Information to the Import Wizard

The Import Wizard calls a number of different functions to gather detailed invoice information (sales or purchase) from an import filter. The CMA_LoadInvoiceHeader fills the given CMA_INVOICEHEADER structure with general information about an invoice, including the identifier of the organization associated with the invoice, the invoice key, the purchase order number, and so on. The invoice key is a unique identifier for the invoice; the Import Wizard passes it to the other invoice-related functions to identify the invoice for which information is being gathered.

Every invoice header must have at least one corresponding invoice detail line. The Import Wizard gathers detail lines by calling the filter's CMA_LoadInvoiceDetail function, which passes the address of a CMA_INVOICEDETAIL structure. The function fills the structure with details that identify the product being sold: the quantity, weight, and unit price of the product; the taxes on the product; and so forth. The Import Wizard follows each call to CMA_LoadInvoiceHeader with repeated calls to CMA_LoadInvoiceDetail until all of the details for the invoice are obtained and the function returns False. One call to CMA_LoadInvoiceHeader may result in multiple calls to CMA_LoadInvoiceDetail.

Every invoice header must have at least one corresponding expected payment detail line. The CMA_LoadDueDateDetail function fills the given CMA_DUEDATEDETAIL structure with information used to track the expected payment dates for the invoices. The Import Wizard follows each call to CMA_LoadInvoiceDetail with repeated calls to CMA_LoadDueDateDetail until all of the expected payment dates for the invoice are obtained and the function returns False. One call to CMA_LoadInvoiceHeader may result in multiple calls to CMA_LoadDueDateDetail.

The import filter's CMA_LoadInvoicePhoneNumber, CMA_LoadInvoiceStreetAddress, and CMA_LoadInvoiceWebAddress functions provide the telephone number, street address, and Web or e-mail address of the organization associated with the invoice. These functions will be used for scenarios where the street address associated with an invoice is not included in the addresses entered in via CMA_LoadOrganizationStreetAddress. This often occurs when the address was unique to this invoice. If the address is already included in the data entered via CMA_LoadOrganizationStreetAddress, then these functions should return False, which indicates there are no records to process.

The import filter's CMA_LoadPaymentDetail function provides detailed information about the payments that organizations have made on the invoices. It provides the payment information by filling the given CMA_PAYMENTDETAIL structure.

The Import Wizard calls the CMA_LoadProductInfo to load information related to products and services as maintained by the source application. The import filter fills the CMA_PRODUCTINFO structure with information that defines the various products and services.

The Import Wizard calls an import filter's CMA_LoadAcctPartCode function to gather account parts, account categories, and rollups for a given company by using the account parts information the filter provided in its CMA_LoadCompany function. The CMA_LoadAcctPartCode function loads information for all account parts. For the account part that you defined as "Prime" in the szPartType member of CMA_PART, you will need to map your chart of accounts to the categories defined in the Account Categories table in the SBCM API and Data Structure Reference. These are predefined account categories that will be used for groupings of data in the reporting and analysis tools.

The CMA_LoadEntry and CMA_LoadDetail functions provide the Import Wizard with information about the journal entries from the specified company's data file. The CMA_LoadEntry function fills in a CMA_JOURNALENTRY structure with the basic information about an entry, and CMA_LoadDetail fills in one or more CMA_JOURNALDETAIL structures with all of the details. The Import Wizard follows each call to CMA_LoadEntry with repeated calls to CMA_LoadDetail until all of the details for the entry have been obtained and the function returns False. One call to CMA_LoadEntry may result in multiple calls to CMA_LoadDetail.