@fabricai/data-dump

Data dump variables for periodic training of FabricAI model

Usage no npm install needed!

<script type="module">
  import fabricaiDataDump from 'https://cdn.skypack.dev/@fabricai/data-dump';
</script>

README

Data dump variables for AI training

The documentation is still under development. For integrations support, please, contact FabricAI for more info.

There are comments in TypeScript files (/src/) on the different props we have for the datadump

Install

npm install --save @fabricai/data-dump-params

Use

import { LedgerReceipt, ChartOfAccount, Dimension, ClosedFiscalPeriod } from './index';
import uuid from 'uuid/v4';
import moment from 'moment';
const timestamp = moment().format('YYYY-MM-DD-HH-mm-ssss');

console.log([
  '',
  '*** INFO ***',
  '',
  'For the data dump - save these AND invoices as json from @fabricai/invoice-template-ai into one (or more zip files (if a lot of large attachments in invoices).',
  'Name the zip file(s) as "YYYY-MM-DD-HH-mm-ssss[PART_NUMBER].zip"',
  `\te.g. ${timestamp}[0].zip and ${timestamp}[1].zip`,
  '',
].join("\r\n"))
console.log(`\nCompany\'s ledger receipts`)
const ledgerReceipts = [
  new LedgerReceipt({
    ledgerReceiptId: uuid(), invoiceId: uuid(), receiptDate: moment().format('YYYY-MM-DD'), transactions: [{
      transactionId: uuid(),
      description: 'Product description',
      account: 4000,
      vatStatus: 'vat_1',
      vatPercent: 24,
      accountingValue: 100,
      value: 124,
      vatDeductionPercent: 100,
    }]})]
console.log(ledgerReceipts)

console.log('\nCompany\'s COA');
const coa = [
  new ChartOfAccount({ accountNumber: 4000, name: 'Purchases'}),
  new ChartOfAccount({ accountNumber: 7000, name: 'Training of personnel'})
]
console.log(coa)

console.log('\nCompany\'s dimensions');
const dimensions = [
  new Dimension({ itemId: '12', itemName: 'Product X Development', dimensionId: '1', dimensionName: 'Projects'})
]
console.log(dimensions)
console.log(`\nCompany\'s closedFiscalPeriod`);
const closedFiscalPeriod = new ClosedFiscalPeriod(moment().add(-2, 'months').endOf('month').valueOf())
console.log(closedFiscalPeriod)
// Then save these into a zip(s)

Integration

To use FabricAI either as a background process or with UI, you will need an API key and endpoint where you can send the invoice. For this, contact FabricAI.

FabricAI