Connection to local folder via ClientConnector tool

Connection to local folder via ClientConnector tool

If your financial software doesn't have a built-in e-in e-invoicing functionality, but does support exporting to or importing from a local folder, we offer the ability to connect to a local folder.

In this instruction page we discuss the design of theClient Connectortool. This is a commandline program that receives and sends new documents based on a folder structure by company and document type. This keeps the exchange with the eConnect platform optimally secure.


AlertWatch out!To set up the ClientConnector requires extensive knowledge of IT.

What are the minimum requirements for the ClientConnector?

  • It must run on a Windows machine - there are no versions for other operating systems
  • .NET framework 4.6.1 or higher must be present
  • Connection must be possible toGate 443towards the eConnect endpoint (listed in the subscription key)
  • Make sure that the software can be started/exetutable andReading and writing rightshas in the workbook
  • For the tool itself, 1 MBDisk spacerequired plus space for downloading the files (variably based on number of documents to be processed, including any PDF)
  • There areNo further system requirementsIn terms of processor, memory etc., it is a very light app and the system load is almost nil.

Step 1 - Create the work environment

  • If you have an subscriptionKey, the latest version can be used
    EConnectCommandLine_1_0_10_1(See Annex).Please contact ussales@econnect.euto apply for a subscription key.

Step 2 - Generate the security keys

FollowThis linkand the instructions in step 1

Step 3 - Select Organization ID


SelectOrganizationsand then the organization for which documents must be retrieved or sent.


In the organization it isExternal IDfind what you need when setting up the config asCompanyID.

Step 4 - Set the configuration

Enter the values in the application settings and check them. Use the security keys from step 2. The values can be overruled by giving them as an argument.
The following values must be adjusted for use.

  1. Fill in the security details from Step 2ConsumerKey, Consumer Secret and RequesterId.
  2. Enter Organization ID from Step 3CompanyId.
  3. Fill in the location for the documents that must be picked up or where the documents come from before shipment atWorking directorory.This directory should be created for use. For example: {{ComapnyId}}\{{DocumentType}} or XCAb123456\Inbox (This location is relative to the current directory.)
  4. WithDocument typeIndicates which documents to download (Inbox or Outbox) or that documents should be sent (Send)
  5. Give withPDFDownloadwhether the document should also be retrieved as a .pdf file.
  6. Default values (adjust in consultation only): MasterTemplateId, ConversionPartnerGroupId, ConversionFileExtensions, ConversionPartner, TransformXSLT, AddExternalId, CleanXML, Action
Since version 1.0.1, an subscription Key is required. This will be sent on request, for this requires an API subscription. The subscription Key must be completed in the section //system.serviceModel/client/endpoint at the bottom of the configuration file.


AlertExampleConfiguration file (Watch out: the configuration on your system may vary, check the environmental variables):

  1. xml version="1.0" encoding="utf-8"?
  2. Release
  3. Econnection Command Line Tool

  4. ## Usage info:
  5. "'"
  6. EConnectCommandLine.exe -help
  7. "'"

  8. ##How to:
  9. Download invoice from inbox and oubox or send documents for a single company

  10. 1. Get access keys from https://platform.everbinding.nl
  11. 2. Setup this config file (EConnectCommandLine.exe.config)
  12. Set endpoint at the end of this config with the endpoint supplied with subscriptionKey
  13. 3. Create working directory to store or read files from.
  14. The application must have write rights in this directory
  15. In my case I created: C:/EConnect/Inbox/XCNL10019/ and C:/EConnect/Outbox/XCNL10019/
  16. And for sending: C:/EConnect/Send/XCNL10019/
  17. 4. Run application to:

  18. Download inbox documents:
  19. "'"
  20. EConnectCommandLine.exe -w C:/EConnect/XCNL10019/Inbox/ -t inbox -c XCNL10019 -d 2016-03-01
  21. "'"
  22. Download outbox documents:
  23. "'"
  24. EConnectCommandLine.exe -w C:/EConnect/[CompanyId]/[DocumentType]/ -t outbox -c XCNL10019 -d 2016-03-01
  25. "'"
  26. - send documents:
  27. "'"
  28. EConnectCommandLine.exe -w C:/EConnect/XCNL10019/Send/ -t send -c XCNL10019
  29. "'"
  30. - upload documents (conversion task):
  31. "'"
  32. EConnectCommandLine.exe -w C:/EConnect/[CompanyId]/[DocumentType]/[Action]/ -t inbox -c XCNL10019 -a Upload - -template=GLDT9223370606989915978RA0000006DTP2000109 -partnerid=XGC4144005987345172
  33. "'"
  34. ## Notes:
  35. - The application creates a .econnect file to store the created date of the most recently downloaded
  36. file Contents of the file can be modified to get document with an earlier date.

  37. Have two copies for the executable and config file, if you can pass the arguments
  38. to the executeable.
  39. Application will not detect if it runs multiple times.

  40. - A log file is created in the same directory of this executable by default.
  41. This can be changed in the log4net section.
  42. See https://logging.apache.org for config examples.

  43. - Only *.xml files are fetched for sending and uploading in the working directory.
  44. The filename will be appended after sending with ".done" or when sending fails to ".error".

  45. The following special features are available
  46. AddExternalId If set to true will add the eVerbinding ExternalId in the document.
  47. This is only needed when the receiving software can use this
  48. CleanXML If set to true will remove the namespace statement by element.
  49. This is only needed when the receiving software has problems with this use of namespaces.
  50. - TransformXSLT will do a transformation base on XSLT file.

  51. -->
  52. <configuration>
  53. <configSections>
  54. <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/>
  55. <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
  56. <section name="EConnectCommandLine.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
  57. <section name="EConnectApi.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
  58. </sectionGroup>
  59. </configSections>
  60. <applicationSettings>
  61. <EConnectCommandLine.Properties.Settings>
  62. <setting name="MasterTemplateId" serializeAs="String">
  63. Gldt9223370666504283001ra0000006dtp2000001
  64. </setting>
  65. <setting name="CompanyId" serializeAs="String">
  66. {{CompanyId like XCNL10019}}
  67. </setting>
  68. <setting name="ConversionPartnerGroupId" serializeAs="String">
  69. Xgc4144005987345172
  70. </setting>
  71. <setting name="ConversionFileExtensions" serializeAs="String">
  72. pdf,png,jpg,jpeg,tiff
  73. </setting>
  74. <setting name="RequesterId" serializeAs="String">
  75. {{email address}}
  76. </setting>
  77. <setting name="ConversionPartner" serializeAs="String">
  78. Conversion partner
  79. </setting>
  80. <setting name="ConsumerKey" serializeAs="String">
  81. {{ConsumerKey}}
  82. </setting>
  83. <setting name="ConsumerSecret" serializeAs="String">
  84. {{ConsumerSecret}}
  85. </setting>
  86. <setting name="WorkingDirectory" serializeAs="String">
  87. {{ComapnyId}}\{{DocumentType}}
  88. </setting>
  89. <setting name="Action" serializeAs="String">
  90. Download
  91. </setting>
  92. <setting name="DocumentType" serializeAs="String">
  93. DocumentType Inbox or Outbox or Send}
  94. </setting>
  95. <setting name="PDFDownload" serializeAs="String">
  96. True
  97. </setting>
  98. <setting name="TransformXSLT" serializeAs="String">
  99. <value />
  100. </setting>
  101. <setting name="AddExternalId" serializeAs="String">
  102. False
  103. </setting>
  104. <setting name="CleanXML" serializeAs="String">
  105. False
  106. </setting>
  107. <setting name="ExtractSenderIdFromPayload" serializeAs="String">
  108. True
  109. </setting>
  110. </EConnectCommandLine.Properties.Settings>
  111. </applicationSettings>
  112. <log4net>
  113. <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
  114. <layout type="log4net.Layout.PatternLayout">
  115. <conversionPattern value="[%property{company}] %-5level %logger{1} - %message%newline"/>
  116. </layout>
  117. </appender>
  118. <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
  119. <layout type="log4net.Layout.PatternLayout">
  120. <conversionPattern value="[%property{company}] %message%newline"/>
  121. </layout>
  122. </appender>
  123. <appender name="FileAppender" type="log4net.Appender.FileAppender">
  124. <file value="log-file.txt" />
  125. <appendToFile value="true" />
  126. <layout type="log4net.Layout.PatternLayout">
  127. <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
  128. </layout>
  129. </appender>
  130. Uncomment when needed. The Appender must be uncommented.
  131. Maybe it needs to be run as administrator for the first time
  132. <!--    
  133. <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
  134. <applicationName value="EConnectCommandLine" />
  135. <layout type="log4net.Layout.PatternLayout">
  136. <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
  137. </layout>
  138. </appender>
  139. -->    
  140. <root>
  141. <level value="DEBUG"/>
  142. <appender-ref ref="ConsoleAppender"/>
  143. <appender-ref ref="TraceAppender"/>
  144. <appender-ref ref="FileAppender"/>
  145. Uncomment when needed. The Appender must be uncommented.
  146. Maybe it needs to be run as administrator for the first time
  147. http://logging.apache.org/log4net/release/faq.html#trouble-EventLog
  148. <!--
  149. <appender-ref ref="EventLogAppender"/>
  150. -->      
  151. </root>
  152. </log4net>
  153. <startup>
  154. <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
  155. </startup>
  156. <system.serviceModel>
  157. <bindings>
  158. <basicHttpBinding>
  159. <binding name="EConnectServiceSoap" maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647">
  160. <security mode="Transport" />
  161. </binding>
  162. <binding name="EConnectServiceSoap1" />
  163. </basicHttpBinding>
  164. </bindings>
  165. <client>
  166. <endpoint address="https://api.everbinding.nl/soap/v3.1/?subscriptionKey={{{{subscriptionKey}}"
  167. binding="basicHttpBinding" bindingConfiguration="EConnectServiceSoap"
  168. contract="EConnectService.EConnectServiceSoap" name="EConnectServiceSoap" />
  169. </client>
  170. </system.serviceModel>
  171. </configuration>

Step 5 - Test the operation

Launch the ClientConnector via the commandline or shortcut as follows: EConnectCommandLine.exe -help

  • Example: download inbox documents
    EConnectCommandLine.exe -w C:/EConnect/XCNL10019/Inbox/ -t inbox -c XCNL10019 -d 2016-03-01
  • Example: download outbox documents
    EConnectCommandLine.exe -w C:/EConnect/[CompanyId]/[DocumentType]/ -t outbox -c XCNL10019 -d 2016-03-01
  • Example: Send documents
    EConnectCommandLine.exe -w C:/EConnect/XCNL10019/Send/ -t send -c XCNL10019

Some comments on the use

  • The ClientConnector will create a .econnect file that tracks what the last minute of updating has been. The contents of this file can be adjusted to retrieve documents with an earlier date and time.
  • After downloading and saving the XML invoice, a PDF invoice is also created with the same name but with the .PDF extension in the same folder. If the PDF is present in the XML as a 'primary file', it is used for this purpose and in other cases the PDF is generated based on the information in the XML. This can be turned off by means of the option "-p false" or set the value when PDFDownload to "false" in the config file.
  • The ClientConnector can be started several times and run as parallel processes. There is no control from the app itself.
  • All applicationSettings from the config file can also be given as an option. UsageEConnectCommandLine -?to display all possible options.
  • A log file is created in the folder where the program files are located. This can be adjusted in the config in the log4net section. See alsohttps://logging.apache.orgfor more examples. To do this, see in the //log4net part in the config file. In this part you can also choose to have the logs in the Windows Event logs via EventLogAppender.
  • Only *.xml files are covered when sending in the workbook.
  • The filename is renamed after sending by an addition, '.done' if successful, or '.error' if something has gone wrong.

Important shipping fields in the SI-UBL

The data for the recipient are included (order of importance):

//cac: AccountingCustomerParty/cac:Party/cbc: EndpointID

//cac: AccountingCustomerParty/cac:PartyLegalEntity/cbc:CompanyID

//cac: AccountingCustomerParty/cac:Party/cac: PartyTaxScheme/cbc:CompanyID

Email address:

//cac: AccountingCustomerParty/cac:Party/cac:Contact/cbc: ElectronicMail

//cac: AccountingCustomerParty/cac: AccountingContact

//cac: AccountingCustomerParty/cac:BuyerContact

At least 1 ID and 1 e-mail address must be entered. The E-mail address is optional but may lead to an error message during sending if the document cannot be delivered based on the ID. To maintain good control over the routing of the document, it is recommended to use cbc:EndpointID. This gives the possibility to send based on VAT (VAT) number and also to have filled in the Chamber of Commerce number. Without cbc: EndpointID, it will be sent on Chamber of Commerce number if it is present.

Since version 1_0_4_2It is also possible to send NLCIUS with numbers as identifiers. Such as 0106: for the NL:KVK: and the 0190: for the NL:OIN:.


IdeaTip:SAdd an automatic task (Windows)

    • Related Articles

    • Sending invoice to Belgium via the platform

      To send an invoice, you must have activated your organization at eConnect. Activating a company is described inCreating environment at eConnect. ForSending invoices from a Belgian entityMore information can be found on our general website. Sending ...
    • Create connection keys in eConnect

      Are you intermediary/accountant? Follow the steps for connecting through a Request for authorisation. Note, connecting to eConnect is about port 443. However, it must be open on the server on which the software is installed/hosted in order to ...
    • Send e-invoices to the government via the platform

      In order to send an invoice, your organization must be activated at eConnect. How to activate your organization is described inCreating environment at eConnect. From the eConnect platform you canInvoices sentBecome to theDutchGovernment(For Belgian ...
    • Processing of sales invoices

      If your software package cannot send sales invoices via eConnect, it is still possible to process them automatically in the financial administration by sending a copy to eConnect. Deliver invoices with UBL file When an invoice is offered with a UBL ...
    • Conversion task process from start to finish

      OneConversion taskContains a file that must be converted to an electronic invoice. Often this is a PDF invoice, or a photo of a receipt. Each task contains one document to convert. By starting the task, the best conversion method is searched and the ...