Credit Log Table

The Credit Log displays a chronological list of all actions involving credit usage within your shop. This includes using credits to pay for invoices, returning invoices for distributor credit, and more. If you don't see any Credit Log data listed, it means the store has not performed any actions that populate the table.

Dataset ID: c7f03d78-8961-41e7-9186-fa48eb654eef

Unique Composite Key(s): id, storeid

Datetime Dataset Last Updated: last_retrieved_timestamp

Incremental Load Logic: Use the column shift_dateopen as data appends per new credit action completed

Pull Previous Day - Data-Raw Append Example:

{"sql": "SELECT * FROM table WHERE date(shift_dateopen) = date(date_add(now(), INTERVAL -1 day)) "}

Pull Previous Successful Update - Data-Raw Append Example:

{"sql": "SELECT * FROM table WHERE date(shift_dateopen) >= $stored_last_update_datetime"}
  • stored_last_update_datetime is your stored datetime for last successful data pull

TIP: As a best practice, we recommend that you save the timestamp for each of your dataset pulls as 'stored_last_update_datetime'. Note that this value is not saved in our datasets, but is a suggestion.

Column NameDefinitionExample Output
invoice_line_idInvoice Line Item IDbcbe583c-5019-11e9-8f30-jou7df09a125
idCredit Log IDe795df7a-7687-46c3-bf2e-c3aa7720fc15
invoice_idTreez Generated Invoice IDfd34470b-9b65-4bc9-9bb2-6f617f03f9f4
invoice_numberTreez Generated Invoice Number1500
invoice_external_idCustomer Submitted Invoice IDHB420
datetimeDate–Time Actions Took Place2019-11-20T14:58:31
distributorDistributor NameHERBL INC.
actionAction taken that impacted CreditDESTROYED
reasonCustomer GeneratedRETURN
userSell Treez user that performed actionSheldonP
amountDollar amount related to the transaction performed12.4
distributor_balanceRemaining balance after transaction, at the point of transaction12.4
current_distributor_balanceCurrent distributor balance85.01
storeidID of Store420
datalake_dateThe date that the store was added to the datalake.2021-09-13
last_retrieved_timestampthe Date–Time we last retrieved data from SellTreez2021-06-09T14:18:30