Salesforce

API Best Practices - How to adjust my Twinfield API connection to match the API limit on number of transaction lines?

Article Information
NL
Inhoud van het artikel
In this article, we will outline the modifications that need to be made when communicating with our API considering the new limits of the maximum number of transaction lines.

API limit on number of transaction lines
Another limit that will be enforced for all customers, is a limit on the number of transaction lines that a single transaction can hold. The number of lines that a single transaction can hold will be set to a maximum of 1000 lines. An error will be shown when 1000 or more lines in a single transaction are sent to Twinfield, and the transaction will not be posted.

The first way of avoiding this situation is to analyze the accounting process and determine with your customers if the current information and number of lines in the transaction are necessary with the current process.

In many of these cases, a change in the accounting method or the amount of information sent to Twinfield significantly changes the number of lines per transaction. For webshops specifically, we have published an article about this, where we present a best practice for not sending all sales transactions individually to Twinfield: API Best Practices - Common API connections - Webshop

There are also many cases where if you group transaction lines together the information for the accounting process is still sufficient, but it does reduce the number of transaction lines. This can be achieved by, for example, not sending a line for every article, but only a line for every article group.

Another way to reduce the number of lines in a transaction is to only send lines with data, and to not send lines to Twinfield with a zero amount.

If the above solutions are not sufficient, and it is necessary to send a transaction to Twinfield with more than 1000 lines, you would need to split this total transaction into multiple smaller transactions in Twinfield. For this, you can use a suspense account to post any debit or credit balances that might occur from splitting up the transaction.

This way you can post all the information you need for this transaction in Twinfield, per smaller transaction of 1000 lines. In this case, you can use either the description or a freetext in Twinfield to correlate the different transactions that are part of a larger transaction.

API limit on number of messages or entities. 

Most of the various entities within Twinfield (like customers, transactions, etc.) can be created or modified by the use of XML messages. Not all entities enforce hard limits related to the maximum size of such XML messages or entities. There are some limitations however to guarantee successful processing of an XML message.
Advise is to limit the number of children within a parent to 25. So, for example, 25 elements within a <transactions> element.

The recommended maximum number of lines within a <transaction>/<lines> or <salesinvoice>/<lines> element is 500. As noted, no guarantee is given that XML messages or entities exceeding these limits are processed.


More information?
API Best practices - API limits effective per October 1st 2024
API Best Practices - Introduction
detail information
31-1-2024 14:03
API Best Practices - How to adjust my Twinfield API connection to match the API limit on number of transaction lines?
187
URL
API-Best-Practices-How-to-adjust-my-Twinfield-API-connection-to-match-the-API-limit-on-number-of-transaction-lines

Powered by