This article is part of this article series:
API Best Practices - Introduction
Introduction
In this article, we will give a more in-depth description of importing sales transactions and customers
for applications for medical professionals. A more generic description of importing sales transactions
and customers is described in the following article:
Importing sales transactions including customersIn general, there are three steps for importing sales transactions for medical professionals:
- Step 7-1: Importing the original sales transaction to Twinfield
- Step 7-2: Importing any rejected amounts by insurance providers as a credit sales transaction
- Step 7-3: Matching both transactions to provide the correct amount to be received for further processing
The process of importing sales transactions has seven steps. You can read the details of these steps in this article:
Importing sales transactions including customers
- Download all customers that currently exist in Twinfield
- Update the dimension type mask
- Add or update customers into Twinfield
- Find the available transaction types
- Find the available profit-and-loss ledgers
- Find the available vat codes
- Import new sales transactions
Below we will give a more in-depth description of step 7, importing new sales
transactions. It is specifically this step which will consist of additional steps in comparison to the
article describing a general best practice for importing sales transactions and customers.
Step 7: Import new sales transactions
Below is a description of each of the three steps for importing sales transactions for medical professionals.
Good to know: There is a Postman collection in the attachment with ready-to-use examples.
Step 7-1: Importing the original sales transaction to TwinfieldTo import the original sales transaction you can use the Postman collection in the attachment of this article, specifically the request 'Importing the original sales transaction to Twinfield'.
Important: To be able to match the transaction from steps 7-1 and 7-2 it's important to remember their transaction numbers. After a sales transaction has been successfully posted you will receive the transaction number in the XML result. Take a look at <number> in the <header>.
Step 7-2: Importing any rejected amounts by insurance providers as a credit sales transactionThis step is essentially a repetition of the previous step. An important distinction is of course that
the outstanding amount for rejected amounts by insurance providers will be a credit
amount as opposed to a debit amount for the original sales transaction.
Please refer to the Postman collection in the attachment of this article, specifically the request 'Importing any rejected amounts by insurance providers as a credit sales transaction'.
Important: To be able to match the transaction from steps 7-1 and 7-2 it's important to remember their transaction numbers. After a sales transaction has been successfully posted you will receive the transaction number in the XML result. Take a look at <number> in the <header>.
Step 7-3: Matching both transactions to provide the correct amount to be received for further processingAfter importing both the original sales transaction and any rejected amounts by insurance
providers, a match can now be made to make sure that the correct amount to be received will be
available in Twinfield.
The importance of making sure that the correct amount to be received is available in Twinfield is the
automatic matching that Twinfield can provide when processing bank statements. When
transactions are not matched, Twinfield will not have the correct outstanding amount to automatically provide a match for the customer which generally leads to a lot of additional and unnecessary overhead when processing the bank statements.
To create a match you will need the transaction types, numbers and line ID's from step 7-1 and 7-2.
Please refer to the Postman collection in the attachment of this article for an example of how to make the match. Specifically the request 'Importing any rejected amounts by insurance providers as a credit sales transaction'.
Keep these things in mind while matching:
- The match code is always 170. This is for matching customers.
- The match date is always the date of the latest transaction that you are matching.
- The line ID is always 1.