to get a personalized navigation.
to get a personalized navigation.
Hello my data-loving comrades!
At our company we assist customers in doing their business administration through Visma.Net Financials. Lately we've been using the API more-and-more to create dashboarding and insights which are helpful both to us and our customers.
My problem:
We control approximately 1000+ customers in which we would like to check when their latest booking was done to filter which customer require additional attention or help. We would like to base this of JournalTransactionv2 in which we would only like to get the first row which has the latest date available in the dataset.
the issue
- Journaltransaction consists of quite big datasets if I were to get them for all customers first. It doesn't sound efficient to acquire the data of that many if I only need 1 row containing the maximum transaction date present. Does anyone have an idea how to acquire the latest journalentry present in the customers administration?
So far I've got a loop working which is able to acquire the data needed. Unfortunately, not all customers are using their business administration daily because we maintain them.
The result I wish for:
- Customer Name and code (I could use the CONTEXT endpoint for this)
- Column with the highest Transaction Datetime present (so far I've come up with using Journaltransactions for this)
I've got everything working for the basics, but I want to be smart about this before retrieving lots of data I don't need. Any suggestions?
Thank you for reading and time invested.
Kind regards,
Wouter
Solved! Go to Solution.
Hi,
Depending on the type of transactions you are looking for there might be some webhooks you are interested in, for example:
You can read about how to set this up here:
Visma.net ERP API Webhooks Setup API & ERP UI (Event - Subscription - Notification)
If you want to use JournalTransactions, we would recommend that you check the endpoint with the "LastModifiedDateTime" & "LastModifiedDateTimeCondition", where you get the result since the last time you checked:
Update:
In JournalTransactions/V2, there is no need to specify the condition, it is set ">=" by default, the usage with the condition still applies to other endpoints.
Example: GET v2/journalTransactions?LastModifiedDateTime=2021-06-10
This would return only the transactions that have been modified since 2021-06-10.
Parameter usage:
As of today Filtering Parameters does not accept certain characters such as W-Z These are the formats for Filtering *2001-01-01 *2001-01-01 13:13:13 *2001-01-01 13:13:13.133 |
Supported comparative operators for LastModifiedDateTime Conditions on filtering > - Greater than < - Less than <= - Less than or equal to >= - Greater than or equal to |
Hi Magnus,
Thank you so much for your response on this topic. I will have a look at the desired webhook. The main purpose is to monitor usage of VismaNET. So the kind of journalentry doesn't really matter, only the latest activity in comparison to current date.
So I want to know what their last booking was in comparison to today. In combination with a journal entry, a webhook might suffice. Is it possible to sort the rows? It would make it possible to just sort on DATE descending while retrieving only one row necessary per customer :).
Hi,
As of now, it is not possible to change the sort order, it is returning the dataset in ascending order.
I suppose what you could do is to
Then again, if the only need that you have is to check if they have had any new transactions since the last time you checked, you could always just check the endpoint everyday and update the datetime parameter, if the returned set is not empty they have posted to the journal.
Copyright © 2022 Visma.com. All rights reserved.