Show/Hide Toolbars

Therefore™ Help

Tutorials > Solution Designer > Workflow > Sending Documents to Chorus

Chorus Upload for Customer

Scroll

Create a PISTE account

 

Go to https://developer.aife.economie.gouv.fr/en/component/apiportal/registration and create an account. A PISTE account is required to establish a secure connection between Therefore™ and the Chorus portal. It enables access to a limited set of API functions using the provided PISTE credentials.

Log in on this website: https://developer.aife.economie.gouv.fr/en/apps

sd_t_workflow_sendingtochorus_019

 

Configuring the Application

sd_t_workflow_sendingtochorus_020

One PISTE account hosts multiple applications (production and/or sandbox). Every application has its own unique Id and secret, which is used in the Azure Function configuration. Create one separate PISTE application for each of those structures.

sd_t_workflow_sendingtochorus_021

 

 

 

 

How to get a PISTE ID and secret

 

Choose the application TFO_Piste_App in the “Applications” tab. Go to Details in the OAuth credentials tab.
The ClientID is the Id of the current application. Click “View secret” to display secret.

 

sd_t_workflow_sendingtochorus_022

 

 

 

 

 

 

How to connect a Chorus account to a PISTE account

 

Add “EDI and API connections” tab using the following steps.

a)Log into the Chorus portal with your the main account (not your technical account). Go to the Manager Activities tab. Unfold “List of areas of the structure” and click the button “+Add areas”.

sd_t_workflow_sendingtochorus_023

b)Select the checkboxes for “Sulvl des flux” and “Raccordement EDI et API” in the Modify column (it will also be useful later). Click Validate.

sd_t_workflow_sendingtochorus_024

 

c)Go to the “EDI and API connections” tab in Chorus pro portal. Navigate to “Manage API connection”.sd_t_workflow_sendingtochorus_025

d)Navigate to „Declaration API connection request by PISTE”.
sd_t_workflow_sendingtochorus_026

e)Choose the structure that applies to you. Select your PISTE app name from the “PISTE application name” set.  Select “User of an internal application” from the “Type of use” set. A separate App is needed for each structure.

sd_t_workflow_sendingtochorus_027

For “Technical Contact” please enter the details of the person responsible for this API connection.

 

 

Creating a new Workflow for Chorus Upload

 

Create a workflow for your upload task. The following graphic displays a basic example of a workflow.

sd_t_workflow_sendingtochorus_028

A Workflow consists of two workflow tasks.

1.Embed Index Data Task

This task is responsible for embedding xml into a PDF/A-3 file (the Workflow Task will convert a PDF into a PDF/A-3).

2.Call Function Task

This task triggers Azure Function with arguments such as Chorus Pro technical account and password. Azure Function will make following steps:

a)Get OAuth token from PISTE.

b)Upload file to Chorus Pro.

c)Check if file was uploaded and processed successfully by Chorus.

d)Display any errors occurring during processing/uploading in the WF history and in the Chorus portal under “Data Flow Overview”.

sd_t_workflow_sendingtochorus_029

e)If status of the invoice is “Integrated”, it is saved in “Issued Invoices” accessible via the “Search” or “Dashboard” tab.
sd_t_workflow_sendingtochorus_030

 

Setting up Workflow Tasks

 

Embed Index Data Task

sd_t_workflow_sendingtochorus_031

If more than one invoice corresponds to one Therefore™ document, merge them into one file using the “Merge into one file” checkbox. Otherwise, Chorus only uploads the first invoice. Please be informed that only files up to a size of 90 MB can be sent to Chorus.

 

sd_t_workflow_sendingtochorus_032

Use the following settings:

-Profile: “Factur –X”

-Conformance level: “EN16931”

-Embedded XML name: Default (factur-x.xml)

Click “Load Template XML…” and choose the xml file attached below (minimal required xml). It contains the necessary information to be provided in “Index Data as XML (template –based)”.

 

Fill in the following data after the xml template has loaded. Use the Index Data values from Category. If any field is left empty, it will be filled with values from the template xml.

sd_t_workflow_sendingtochorus_033
sd_t_workflow_sendingtochorus_034
Use the following settings.

1.urn:factur-x.eu:1p0:minimum

2.Unique number of invoice. Please remember to keep it as a string.

3. 380

4.Issue date time. To make sure the date is in the correct format add the format in the xml. If you use the factur-x.xml attached above no changes are needed.
<udt:DateTimeString format="102">

5.Seller name

6.Seller’s SIRET number. It must be 14 digits long. If the SIRET is shorter than 14 add 0 before actual the number (e.g., 123 => 00000000000123). The number must be kept as a string.

7.Country ID (e.g., FR for French)

8.Buyer’s name

9.Buyer’s SIRET number. It must be 14 digits long. If the SIRET is shorter than 14 digits add 0 before actual number (e.g., 123 => 00000000000123). The number must be kept as a string.

10.Country ID (e.g., FR for French)

11.Order number or engagement number. This number must be exactly 10 digits. It is mandatory only if “Numéro d’engagement obligatoire :” is set to Oui for company you are looking for in https://communaute.chorus-pro.gouv.fr/annuaire-des-entites-publiques-destinatrices-de-factures/?lang=en
sd_t_workflow_sendingtochorus_035

12.Should be empty

13.Invoice currency code (e.g. EUR for Euro)

14.Amount excluding tax

15.VAT

16.Amount including tax

17.Amount to pay from the invoice

 

 

In the minimal factur-x.xml template there is one more field; BuyerReference.

sd_t_workflow_sendingtochorus_036

 

info

It is mandatory only when Service Code is marked as mandatory

sd_t_workflow_sendingtochorus_016

 

The correct service code can be found on the French government's website:

sd_t_workflow_sendingtochorus_017

 

For more information about Factur-X refer to the following documentation:

Factur-X reference

Call Function Task
sd_t_workflow_sendingtochorus_037

Request URL:

https://tfochorusupload.azurewebsites.net/api/v1/ChorusUpload

cpro_account and cpro_password are your Chorus pro technical account and password.
piste_account and piste_password are your PISTE account and password.

This Azure Function will be available only from TFO EU.
 

 

 

Common errors

 

Error: ExchangedDocument ID already exists in your structure in Chorus.

Solution: Check if document is already uploaded (sometimes Azure Function can be called twice for same document). If not, change ExchangedDocument ID.

 

Error: SIRET number for seller or buyer has invalid number of digits (more/less than 14).

Solution: If SIRET is shorter than 14 digits add 0s before the actual number.

E.g SIRET is 12345. Make it 00000000012345.

 

Error: SIRET number for seller or buyer does not exists in Chorus.

Solution: Check if SIRET is correct here. Just provide name/SIRET of company and check if it matches.
https://communaute.chorus-pro.gouv.fr/annuaire-des-entites-publiques-destinatrices-de-factures/?lang=en

 

Error: Not all necessary fields are filled.

Solution: Fill necessary fields. If fields are filled, check if

GuidelineSpecifiedDocumentContextParameter ID is urn:factur-x.eu:1p0:minimum and if the correct xml file was used.

 

Error:  "Please contact your administrator to set/configure PISTE credentials" in WF history.

Solution: Contact your admin. In case of TFO contact Therefore support.

 

© 2024 Therefore Corporation, all rights reserved.