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.

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 Name

Definition

Example Output

invoice_line_id

Invoice Line Item ID

bcbe583c-5019-11e9-8f30-jou7df09a125

id

Credit Log ID

e795df7a-7687-46c3-bf2e-c3aa7720fc15

invoice_id

Treez Generated Invoice ID

fd34470b-9b65-4bc9-9bb2-6f617f03f9f4

invoice_number

Treez Generated Invoice Number

1500

invoice_external_id

Customer Submitted Invoice ID

HB420

datetime

Date–Time Actions Took Place

2019-11-20T14:58:31

distributor

Distributor Name

HERBL INC.

action

Action taken that impacted Credit

DESTROYED

reason

Customer Generated

RETURN

user

Sell Treez user that performed action

SheldonP

amount

Dollar amount related to the transaction performed

12.4

distributor_balance

Remaining balance after transaction, at the point of transaction

12.4

current_distributor_balance

Current distributor balance

85.01

storeid

ID of Store

420

last_retrieved_timestamp

the Date–Time we last retrieved data from SellTreez

2021-06-09T14:18:30


Did this page help you?