Comment on page
Finance and Payments

Possible workflow

An SQL example how to retrieve financial data

Generated CSV report

Possible workflow

Possible data query

Slack notifications
In case an organization accepts payments from customers with direct bank transfers, it opens a potential for mistakes made in the references or amount.
The following workflow can help to control and find overpaid orders or invoices.

Potential workflow

Potential SQL query to retrieve data

Potential message to send to stakeholders
Another popular modification of the previous two workflows is to monitor unallocated bank transfers. Meaning bank transfers made by customers that the system was not able to allocate to any order, invoice, or any other purchased item.
In this case, it is up to you to decide what to do with this transfer. Either return it, or try allocating it manually, or contact the customer and ask about it.
That's how the typical workflow may look like:

Filtering data from large data sets is one of the most common and important tasks for payment operations. One of the powerful instruments Datamin offers for that is Transformer with GJSON query language.
Let's imagine we have the following dataset and we need to filter it in various ways:
[
{
"amount":250,
"created_at":"2022-10-01 16:01:11",
"currency":"USD",
"id":1,
"organization_id":1,
"status":"dispatched",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":250,
"created_at":"2022-10-01 16:01:11",
"currency":"USD",
"id":2,
"organization_id":1,
"status":"paid",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":3677.2,
"created_at":"2022-10-01 16:01:11",
"currency":"USD",
"id":3,
"organization_id":2,
"status":"completed",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":21.87,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":4,
"organization_id":1,
"status":"assembled",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":21.87,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":5,
"organization_id":4,
"status":"assembled",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":341.76,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":6,
"organization_id":1,
"status":"complete",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":2110.76,
"created_at":"2022-10-01 16:01:11",
"currency":"USD",
"id":7,
"organization_id":3,
"status":"new",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":127.89,
"created_at":"2022-10-01 16:01:11",
"currency":"USD",
"id":8,
"organization_id":3,
"status":"new",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":127.9,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":9,
"organization_id":4,
"status":"new",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":344.44,
"created_at":"2022-10-01 16:01:11",
"currency":"USD",
"id":10,
"organization_id":5,
"status":"paid",
"updated_at":"2022-10-01 16:01:11"
}
]
Let's look at the following 4 examples:

Filter:
#(status == "assembled")#
Result:
[
{
"amount":21.87,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":4,
"organization_id":1,
"status":"assembled",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":21.87,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":5,
"organization_id":4,
"status":"assembled",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":67.01,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":12,
"organization_id":2,
"status":"assembled",
"updated_at":"2022-10-01 16:01:11"
}
]
Filter:
#(status == "assembled")#.amount
Result:
[
21.87,
21.87,
67.01
]
Filter:
#(status == "assembled").amount
Result: 21.87
Filter:
#(amount < 30)#
Result:
[
{
"amount":21.87,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":4,
"organization_id":1,
"status":"assembled",
"updated_at":"2022-10-01 16:01:11"
},
{
"amount":21.87,
"created_at":"2022-10-01 16:01:11",
"currency":"EUR",
"id":5,
"organization_id":4,
"status":"assembled",
"updated_at":"2022-10-01 16:01:11"
}
]