> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chift.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Sage 50 FR

# PREREQUISITES

* The integration is compatible with version 5.5 and higher (last 5.9) of Sage 50.
* You need to install a program on the same server where Sage 50 is installed. To ensure the connector works on the server, please make sure before installation that:

  * You have admin access to the server where Sage 50 is installed in order to proceed with the installation

    * **Be aware** that the server/computer must be permanently accessible with internet access (24 hours a day). Otherwise, the data will not be synchronized
  * You know your Sage 50 username and password
  * The .NET Framework 4.8 are installed on the server

# **PREPARATION**

There are two things to do to enable the connection with Sage 50:

* Retrieve the data path to Sage 50 to fill out the connection form.
* Authorise access in Sage 50 to allow the connection to work.

1. **Steps to retrieve the data path to Sage 50:**

   1. From the Sage 50 menu → File → Options → Information

      <img src="https://mintcdn.com/chift/58xMAZRhXvUHYeLR/images/help/sage-50-fr/sage-50-fr-fr-1.png?fit=max&auto=format&n=58xMAZRhXvUHYeLR&q=85&s=d2a37cb3c1fcf2e37cf76aa1f842b00f" alt="" width="1600" height="780" data-path="images/help/sage-50-fr/sage-50-fr-fr-1.png" />
   2. Copy and save the data path to enter it in the connection form

      <img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-2.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=edff1ef23e9a1c6c7b93889b0ad2e219" alt="" width="1600" height="779" data-path="images/help/sage-50-fr/sage-50-fr-fr-2.png" />
2. **Steps to authorise access in Sage 50**

   1. From the Sage 50 menu → File → Options → Utilities

      <img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-3.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=8b56c6c01c2a8590880aa9639bfd641c" alt="" width="1600" height="784" data-path="images/help/sage-50-fr/sage-50-fr-fr-3.png" />
   2. In Miscellaneous → COM Access Authorisation

      <img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-4.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=363e8b79e7a69ac15d2420ec96372531" alt="" width="1600" height="780" data-path="images/help/sage-50-fr/sage-50-fr-fr-4.png" />
   3. Click "Set" to authorise access to Sage 50.

<img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-5.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=29e8636b1c49b95ae84013d5d679c7c7" alt="" width="1600" height="778" data-path="images/help/sage-50-fr/sage-50-fr-fr-5.png" />

# CONNECTION

**Step 1:** Choose a name for your connection.

<img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-6.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=e8a84ef53972f10e5294a99b928ae669" alt="" width="966" height="200" data-path="images/help/sage-50-fr/sage-50-fr-fr-6.png" />

**Step 2:** Paste the route to the Sage 50 data file which you previously collected from your Sage 50 instance.

<img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-7.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=b9382feff31d76cec1d36624a4dfd09f" alt="" width="964" height="222" data-path="images/help/sage-50-fr/sage-50-fr-fr-7.png" />

**Step 3:** Enter the username of your Sage 50 user.

<img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-8.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=b6cd80d96a4bef5bb8aecdca48606c17" alt="" width="990" height="214" data-path="images/help/sage-50-fr/sage-50-fr-fr-8.png" />

**Step 4:** Enter the password of your Sage 50 user.

<img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-9.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=e83d69ad674c8779974ea2a36bfd0321" alt="" width="968" height="198" data-path="images/help/sage-50-fr/sage-50-fr-fr-9.png" />

**Step 5:** Click "Connect" to finalise the connection.

<img src="https://mintcdn.com/chift/58xMAZRhXvUHYeLR/images/help/sage-50-fr/sage-50-fr-fr-10.png?fit=max&auto=format&n=58xMAZRhXvUHYeLR&q=85&s=3d0a218e0b8fadb6751c21f322f40bb2" alt="" width="184" height="79" data-path="images/help/sage-50-fr/sage-50-fr-fr-10.png" />

# **DOWNLOAD OF THE LOCAL AGENT**

Sage 50 is installed on a server. To enable data sharing, it is necessary to download a program (local agent) that will allow data transmission with Sage 50.

After the connection step, you will have two options to download and install the local agent on the same server as your Sage 50 instance:

* If Sage 50 is hosted on your computer, you can directly download the program by clicking on **Download**.
* If Sage 50 is hosted on another server, you have the option to send the program via email to the person or company hosting Sage 50 so they can download and install it.

<img src="https://mintcdn.com/chift/58xMAZRhXvUHYeLR/images/help/sage-50-fr/sage-50-fr-fr-11.png?fit=max&auto=format&n=58xMAZRhXvUHYeLR&q=85&s=ff2d88cc724675e21cea8e94c54afabc" alt="" width="1600" height="971" data-path="images/help/sage-50-fr/sage-50-fr-fr-11.png" />

# Specificities associated to the 6.3 version:

Latest update brings a **major** change in the way the local agent interacts with the COM, forcing us to abandon the Windows Service setup and replace it by a Task Scheduler setup.

As a consequence, the installer has been updated:

* Version: 6.3 ⇒ we align the agent version with the software version
* It is **mandatory** to configure the user used to run the task

Note that the windows session of the user you are going to select here needs to be connected to the server in order for the connection to work

<img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-12.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=f2a0d26fb9ae5f1604e3d25892be50a6" alt="image (23).png" width="581" height="471" data-path="images/help/sage-50-fr/sage-50-fr-fr-12.png" />

* The password is **only** used to validate the user’s credentials (that the user exists)
* The remaining installer steps remain the same
* The installer creates a new Task (Task Scheduler) under the Chift folder

The task is created in the store (session) of the user executing the installer. It can be different than the user executing the task (*run as*).

* The task is configured to start at log on of the user configured in the installer

<img src="https://mintcdn.com/chift/9bn2xYeQyHl1D8Fi/images/help/sage-50-fr/sage-50-fr-fr-13.png?fit=max&auto=format&n=9bn2xYeQyHl1D8Fi&q=85&s=6bdee4ff07d972857a8b6e517eb63a64" alt="image (24).png" width="1600" height="81" data-path="images/help/sage-50-fr/sage-50-fr-fr-13.png" />

* If the task fails, the Task Scheduler will try to restart it (5 attempts, every 3 minutes).

The agent can be uninstalled through Add or remove programs:

* Search for Sage50FRService and uninstall
* It deletes the task and the files

Although the uninstall logic tries to stop the task before deleting the content of the folder Sage50FRService, it happens that the files are still locked by the task at the time of the deletion, preventing them from being deleted.

The only changes in the agent itself are:

* Use the latest SAGE 50 FR version (6.3)
* Supports local and remote mode

Local folder expects a path:

***C:/Données Ciel/Dossiers/chift/Ciel Gestion Commerciale/Folder.SgWgc***

Remote folder expects a filename:

***MyFolder***

* Add a 5-seconds-sleep to start the COM
