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.
Watch 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.
- Fill in the security details from Step 2ConsumerKey, Consumer Secret and RequesterId.
- Enter Organization ID from Step 3CompanyId.
- 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.)
- WithDocument typeIndicates which documents to download (Inbox or Outbox) or that documents should be sent (Send)
- Give withPDFDownloadwhether the document should also be retrieved as a .pdf file.
- 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.
ExampleConfiguration file (Watch out: the configuration on your system may vary, check the environmental variables):- xml version="1.0" encoding="utf-8"?
- Release
- Econnection Command Line Tool
- ## Usage info:
- "'"
- EConnectCommandLine.exe -help
- "'"
- ##How to:
- Download invoice from inbox and oubox or send documents for a single company
- 1. Get access keys from https://platform.everbinding.nl
- 2. Setup this config file (EConnectCommandLine.exe.config)
- Set endpoint at the end of this config with the endpoint supplied with subscriptionKey
- 3. Create working directory to store or read files from.
- The application must have write rights in this directory
- In my case I created: C:/EConnect/Inbox/XCNL10019/ and C:/EConnect/Outbox/XCNL10019/
- And for sending: C:/EConnect/Send/XCNL10019/
- 4. Run application to:
- Download inbox documents:
- "'"
- EConnectCommandLine.exe -w C:/EConnect/XCNL10019/Inbox/ -t inbox -c XCNL10019 -d 2016-03-01
- "'"
- Download outbox documents:
- "'"
- EConnectCommandLine.exe -w C:/EConnect/[CompanyId]/[DocumentType]/ -t outbox -c XCNL10019 -d 2016-03-01
- "'"
- - send documents:
- "'"
- EConnectCommandLine.exe -w C:/EConnect/XCNL10019/Send/ -t send -c XCNL10019
- "'"
- - upload documents (conversion task):
- "'"
- EConnectCommandLine.exe -w C:/EConnect/[CompanyId]/[DocumentType]/[Action]/ -t inbox -c XCNL10019 -a Upload - -template=GLDT9223370606989915978RA0000006DTP2000109 -partnerid=XGC4144005987345172
- "'"
- ## Notes:
- - The application creates a .econnect file to store the created date of the most recently downloaded
- file Contents of the file can be modified to get document with an earlier date.
- Have two copies for the executable and config file, if you can pass the arguments
- to the executeable.
- Application will not detect if it runs multiple times.
- - A log file is created in the same directory of this executable by default.
- This can be changed in the log4net section.
- See https://logging.apache.org for config examples.
- - Only *.xml files are fetched for sending and uploading in the working directory.
- The filename will be appended after sending with ".done" or when sending fails to ".error".
- The following special features are available
- AddExternalId If set to true will add the eVerbinding ExternalId in the document.
- This is only needed when the receiving software can use this
- CleanXML If set to true will remove the namespace statement by element.
- This is only needed when the receiving software has problems with this use of namespaces.
- - TransformXSLT will do a transformation base on XSLT file.
- -->
- <configuration>
- <configSections>
- <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false"/>
- <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <section name="EConnectCommandLine.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
- <section name="EConnectApi.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
- </sectionGroup>
- </configSections>
- <applicationSettings>
- <EConnectCommandLine.Properties.Settings>
- <setting name="MasterTemplateId" serializeAs="String">
- Gldt9223370666504283001ra0000006dtp2000001
- </setting>
- <setting name="CompanyId" serializeAs="String">
- {{CompanyId like XCNL10019}}
- </setting>
- <setting name="ConversionPartnerGroupId" serializeAs="String">
- Xgc4144005987345172
- </setting>
- <setting name="ConversionFileExtensions" serializeAs="String">
- pdf,png,jpg,jpeg,tiff
- </setting>
- <setting name="RequesterId" serializeAs="String">
- {{email address}}
- </setting>
- <setting name="ConversionPartner" serializeAs="String">
- Conversion partner
- </setting>
- <setting name="ConsumerKey" serializeAs="String">
- {{ConsumerKey}}
- </setting>
- <setting name="ConsumerSecret" serializeAs="String">
- {{ConsumerSecret}}
- </setting>
- <setting name="WorkingDirectory" serializeAs="String">
- {{ComapnyId}}\{{DocumentType}}
- </setting>
- <setting name="Action" serializeAs="String">
- Download
- </setting>
- <setting name="DocumentType" serializeAs="String">
- DocumentType Inbox or Outbox or Send}
- </setting>
- <setting name="PDFDownload" serializeAs="String">
- True
- </setting>
- <setting name="TransformXSLT" serializeAs="String">
- <value />
- </setting>
- <setting name="AddExternalId" serializeAs="String">
- False
- </setting>
- <setting name="CleanXML" serializeAs="String">
- False
- </setting>
- <setting name="ExtractSenderIdFromPayload" serializeAs="String">
- True
- </setting>
- </EConnectCommandLine.Properties.Settings>
- </applicationSettings>
- <log4net>
- <appender name="TraceAppender" type="log4net.Appender.TraceAppender">
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="[%property{company}] %-5level %logger{1} - %message%newline"/>
- </layout>
- </appender>
- <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender">
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="[%property{company}] %message%newline"/>
- </layout>
- </appender>
- <appender name="FileAppender" type="log4net.Appender.FileAppender">
- <file value="log-file.txt" />
- <appendToFile value="true" />
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
- </layout>
- </appender>
- Uncomment when needed. The Appender must be uncommented.
- Maybe it needs to be run as administrator for the first time
- <!--
- <appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
- <applicationName value="EConnectCommandLine" />
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
- </layout>
- </appender>
- -->
- <root>
- <level value="DEBUG"/>
- <appender-ref ref="ConsoleAppender"/>
- <appender-ref ref="TraceAppender"/>
- <appender-ref ref="FileAppender"/>
- Uncomment when needed. The Appender must be uncommented.
- Maybe it needs to be run as administrator for the first time
- http://logging.apache.org/log4net/release/faq.html#trouble-EventLog
- <!--
- <appender-ref ref="EventLogAppender"/>
- -->
- </root>
- </log4net>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/>
- </startup>
- <system.serviceModel>
- <bindings>
- <basicHttpBinding>
- <binding name="EConnectServiceSoap" maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647">
- <security mode="Transport" />
- </binding>
- <binding name="EConnectServiceSoap1" />
- </basicHttpBinding>
- </bindings>
- <client>
- <endpoint address="https://api.everbinding.nl/soap/v3.1/?subscriptionKey={{{{subscriptionKey}}"
- binding="basicHttpBinding" bindingConfiguration="EConnectServiceSoap"
- contract="EConnectService.EConnectServiceSoap" name="EConnectServiceSoap" />
- </client>
- </system.serviceModel>
- </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:.