Table: dbo.Quick_Books_Retrieved_Account
this table contains information on gl accounts retrieved from quickbooks for a given ACS client, where the gl accounts have not yet been imported into the permanent ACS tables for that client. For quickbooks online, the process of importing data has two steps. First, we retrieve the data from a quickbooks online company, and then we import the retrieved data into the permanent ACS tables. We need a means to store off the information after that first step has completed, but before that second step. This table provides the means for us to store information on accounts that have been retrieved from a quickbooks online company, but not yet imported into the permanent tables in ACS for the client. Once the import completes for one client, the records in this table for that one client will be removed.
Columns
NameTypeConstraintsDescription
quick_books_retrieved_account_KEYint (4)NOT NULLthe primary Key for this table.
client_KEYint (4)NOT NULLthe client key, to allow us to group retrieved gl accounts by ACS client.
is_activebit (1)NOT NULLTrue if the gl account is active, and false if the gl account is not active, in quickbooks.
list_idnvarchar (60)NOT NULLthe id of the account. this is supposed to be a unique value, for the gl accounts of one quickbooks company.
parent_idnvarchar (60)NOT NULLthe parent id of the quickbooks account, if any.
account_numbernvarchar (30)NOT NULLaccount number associated with this account. Account numbers are optional in quickbooks.
namenvarchar (200)NOT NULLthe name of this account.
full_namenvarchar (400)NOT NULLthe full name of the account. this should be a unique value, for the gl accounts of one quickbooks company.
descriptionnvarchar (200)NOT NULLa description of the gl account.
current_balancedecimal (9, 2)Current balance of the QuickBooks gl account. This balance is retrieved from QuickBooks Online.
account_typenvarchar (-1)NOT NULLThe type of the Quickbooks Account, this comes directly from the Web API.
account_subtypenvarchar (-1)NOT NULLThe subtype of the Quickbooks Account, this comes directly from the Web API.
Primary key
NameColumnsDescription
PK_Quick_Books_Retrieved_Accountquick_books_retrieved_account_KEY
Unique constraints
NameColumnsDescription
UK_Quick_Books_Retrieved_Account$client_KEY$list_idclient_KEY, list_id
UK_Quick_Books_Retrieved_Account$client_KEY$full_nameclient_KEY, full_name
Foreign keys
NameColumnsReferenced tableDescription
FK_Quick_Books_Retrieved_Account__Client__client_KEYclient_KEYClient (client_KEY)
Incoming foreign keys
NameColumnsReferencing tableDescription
FK_Quick_Books_Retrieved_Transaction_Distribution__Quick_Books_Retrieved_Account__quick_books_retrieved_account_KEYquick_books_retrieved_account_KEYQuick_Books_Retrieved_Transaction_Distribution

Schema diagram