Implementation tests

Prev Next

In order to test the implementation of the External API generation and the Chorus Pro repository, it is strongly recommended that the deployment be carried out in a sandbox environment beforehand. For D'Angelo, testing in a sandbox is a matter of course.

Graphique décorative

Chorus Pro filing architecture

Before testing, D'Angelo needs to understand what he has just set up.
A closer look on 

  • the contents of the package ChorusByFrisbii as well as

  • automated systems.

The ChorusByFrisbii package

After installing the extension package, you have access to the Chorus - Frisbii Extension FRA application, which includes

  • Deposits object (sofactoapp__External_Api__c)

  • access to the Invoices object

  • and Dashboards that give you more information on the status of your depots, which we'll discover in the next article.

The Depot object contains the following fields: 

Country code

Text(55)

Information fields, if required

Service code

Text(150)

Invoice (or account or accounting data) field, to be completed according to the recipient account

Account

Reference(Account)

Invoice field, automatically included in deposit record

Attempt counter

Number (3,0)

Displays the number of attempted filings on Chorus Pro

Issue date

Formula (Date)

Invoice field, automatically included in deposit record

Currency

Picklist

Invoice field, automatically included in deposit record

Deposits

Automatic number

Identifies the warehouse

Invoice status

Text(255)

Invoice field, automatically included in deposit record

Final state of deposit

Picklist

Displays whether the submission is in draft, ready for submission to Chorus Pro, successfully submitted to Chorus Pro, or the processing stages and potential errors.

Invoice

Reference(Invoice)

Link to submitted invoice

PDF invoice

Reference(PDF Invoice)

Link to submitted PDF file

Invoice PDF ID

Text(50)

PDF Invoice record ID

Chorus flow ID

Text(255)

Flow ID generated in the Chorus Pro interface at the time of filing

Attachment IDs

Long text box(32768)

ID of attachments uploaded to Chorus Pro

Deposit

Picklist

Displays deposit status: Ready to send, Error, Finished, Draft

Payment method

Text(255)

Invoice field, automatically included in deposit record

Amount excl. VAT

Currency(14,4)

Invoice field, automatically included in deposit record

Net amount payable

Currency(14,4)

Invoice field, automatically included in deposit record

Amount incl. VAT

Currency(14,4)

Invoice field, automatically included in deposit record

Platform

Picklist

Here: Chorus Pro. We plan to integrate other platforms into FrisbiiApp.

Corporate Name

Text(255)

Invoice field, automatically included in deposit record

Order number

Text(150)

Contract ref. number / Order number to be entered according to the recipient account

Invoice reference

Formula(Text)

Invoice field, automatically included in deposit record

Answer

Long text box(32768)

Potential error message when creating a deposit record

Customer SIRET

Text(255)

The SIRET of the invoice recipient

SIRET Company name

Text(255)

The SIREN + NIC of the invoicing party (defined in the Company name object)

Status Code

Text(255)

Deposit status

Tech Error

Long text box(32768)

Potential error message when filing on the Chorus Pro interface

Invoice type

Text(255)

Invoice field, automatically included in deposit record

See PDF

Formula (Text)

Link to download PDF file

Automation

You have set up the EXTAPIScheduledCreation Apex class, which will run at the desired time and day to create records for the Deposits object from invoices eligible for the process ( Eligible fields for Chorus). 

Please note:
By default, the Eligible for Chorus box must be checked manually. If necessary, we recommend automating this step by setting up conditions and exceptions specific to each business case.
We are now aware of the information that is transferred from the invoice to these records.

Once deposits created by the Apex class have been scheduled, they default to deposit-ready status.

The Chorus Connector application you've set up retrieves all deposits with deposit-ready status. If the information is correct, it changes the status to deposit-succeeded. Otherwise, it will indicate an error status, as explained in the article Chorus Pro - Deposit tracking and error management and the Response field will display the nature of the error.

Once deposit-succeeded, the connector sends the deposit to the Chorus interface. If all the required information is present on the deposit, the status (in Frisbii) changes to flow-status-integrated and the invoice is deposited in Chorus.

Test deposit generation

All right! Now that D'Angelo understands how the deposits work, he's ready to test the set-up.

Steps: Create an eligible invoice

1. Create a complete invoice with all mandatory information.
2. Add invoice lines.
3. Check the box Eligible for Chorus on the invoice (or accounting data).
4. Fill in the following fields:

  • Service code either on accounting data or on invoice (if mandatory for recipient)

  • Order number either on the Accounting data or on the Invoice (if mandatory for the recipient)

  • SIRET on the accounting data or on the Account (without space)

5. Fill in the SIRET and NIC fields  on the invoice's company name, which will make up the SIRET field in the Chorus qualification environment (e.g. 00000000301554).
6. Create the invoice PDF.
7. Issue invoice.

Great! The preparation is done. Now let's test the automation. To avoid waiting for the time you've set or modifying the scheduled task, or even creating a new one, we're going to launch the Apex class EXTAPIScheduledCreation by hand. 

Procedure: Run the batch manually

1. Go to Developer Console.

2. In the Debug menu > Open Execute Anonymous Window.
3. In the Enter Apex Code window, paste this expression and :

chorusbyFrisbii.EXTAPIScheduledCreation schedule = new chorusbyFrisbii.EXTAPIScheduledCreation(); schedule.execute(null);

5. Click on the Execute button to run the script.

D'Angelo is curious, if his setup worked well. He wants to control the result quickly.

Check deposit creation

As mentioned above, the Apex EXTAPIScheduledCreation class creates deposits from eligible invoices. Let's look at the original invoice to verify this.

Steps

1. Return to your invoice earlier and check that a deposit record has been created via the list view. Note: One record per eligible invoice is expected.
2. Make sure that all mandatory fields are included in the deposit.
3. Check that the To be corrected field contains an error message with the list of missing mandatory fields  - if applicable.
4. Also check that the PDF Invoice field contains the link to the PDF record of the invoice.
5. Check that the Final deposit status field contains the value: Ready for deposit.  

Reminder: Technical fields are also  present in the Repository object (External API):

Choice for deposit Status_Chorus__c

Technical info Frisbiiapp_Chorus_Status_Code__c

Technical Field Frisbiiapp__Status_Code__c

Draft

Draft

deposit-not-ready

Error

Display error

Displays the error trigger

Completed

Integrated Flow

Flow-status-Integrated

Ready to send to Chorus

Ready for deposit

deposit-ready

Check the deposit on the Chorus Pro platform

Once the deposit batch has been launched, the final deposit status field contains the value: Integrated flow (for a successful deposit).

Steps

1. Connect to the Chorus Pro qualification environment (test environment):

2. Check that invoices have been sent.