For customers of the software "Easyjob" (https://www.protonic-software.com/de/home/), CrewBrain offers an automated interface through which order data can be automatically transferred to CrewBrain. Togehter with the company Mines-Service (https://www.minesservice.de/minesmodules-crewbrain-api) we provide an interface between Easyjob and CrewBrain.
To activate synchronization, the URL at which the Easyjob instance is accessible must first be specified. Then a user can log in with their Easyjob credentials. It may be advisable to create a technical user for this purpose; this user should have full access rights to projects of all branches, since filtering by branch is currently not possible in the Easyjob API.
Easyjob is usually hosted locally. Therefore, for CrewBrain to access the data in Easyjob, the server must be accessible from outside via URL or IP. This usually requires firewall exceptions and port forwarding in the local network. Only when access to the API from outside is possible can the data be retrieved by CrewBrain.
The first question is: on which port does the API run? By default, it is port 8008 for Easyjob, but this can be changed in the Easyjob settings. The best way is to open a browser directly on the computer where the Easyjob server is running and enter the following in the address bar:
http://localhost:8008/api.json/Common/GetGlobalWebSettings
Easyjob should respond with a list of global settings; this endpoint is accessible without login. If there is no response, the port is incorrect and may need to be adjusted.
If this works, go to another PC in the local network, open a browser again, and this time enter the IP address of the Easyjob server instead of "localhost". This should also work.
Now comes the actual step of opening the port in the firewall or router. Once this is set up, you can (preferably from a PC or smartphone outside your local network) try to enter the public IP (or the Dyn-DNS address) instead of "localhost" in the URL. As soon as you get either the error message or the list of clients, everything should be ready and the address can be entered in CrewBrain.
Security when opening ports: By opening the port, the Easyjob API is made publicly accessible on the Internet. For this reason, it makes sense to restrict the access to certain IPs—in this case, the IPs of our production and standby servers.
When the API call works and the user is logged in, the synchronization offers various configuration options to transfer the projects cleanly from Easyjob.
Via the Easyjob API, a maximum of 50 projects can be retrieved for a calendar day. This also includes long-term projects and permanent rentals. If more than 50 projects are occasionally carried out on a day, the Easyjob project list must be generated on the server and transferred to CrewBrain.
Otherwise, you can also ask MinesService for a corresponding plug-in. With this plug-in, you can then manually click on the jobs that are to be synchronized with CrewBrain, making it possible to transfer more than 50 projects per day.
Using PowerShell, the corresponding project list can be generated directly on the Easyjob server. The server name and path may need to be adjusted.
sqlcmd -S easyjob-server\easyjob6 -U sa -P _easyjob6P@ssW0rd_ -Q "select IdProject from easyjob.dbo.project where startdate > GETDATE()" -o "C:\users\...\export.csv" -W -w 1024 -s ";" -h-1
Values such as easyjob-server\easyjob6, possibly the password, and the path (C:\users\...\export.csv) must be adapted to the local conditions.
Uploading the project list can be done manually or automated with the following PowerShell command.
Invoke-RestMethod -Uri 'http://testfirma.crewbrain.test/easyupload' -Method Post -InFile 'C:\users\...\export.csv'
The URL (subdomain) and the file path must be adapted to your own conditions.
Mapping allows resource functions, statuses, and other data to be assigned between Easyjob and CrewBrain. Mapping is essential for jobs and resources to be transferred at all.
The event statuses can be mapped after retrieving the statuses configured in Easyjob. It can be specified which projects with which status should be transferred at all, and which status should be assigned to them in CrewBrain.
Under "Resource functions", the mapping of Easyjob resources to CrewBrain categories (e.g., sound technician, lighting technician, etc.) is done. First, the resource functions can be retrieved via the "Get Easyjob functions" button. Then, for each function, it can be defined whether it should be synchronized and, if so, which CrewBrain category should be used.
Resources planned in Easyjob (employees and vehicles) are fully transferred to CrewBrain if they are already planned in the project in Easyjob (Workflow: create a test project in Easyjob that contains all resources). The synchronization logic tries to recognize existing datasets and map them automatically. Datasets (employees and vehicles) that do not yet exist in CrewBrain are automatically created by the synchronization in CrewBrain.
The transfer of clients & locations takes place automatically as soon as they are needed in a job or project.
The synchronization process runs automatically every 2-3 hours and thus keeps the data always up to date. Additionally, there is a synchronization icon at the top of the calendar views in CrewBrain, through which the process can also be started manually (for the entire dataset). This is useful, for example, when a new order has just been created in the source system.
In addition to this option to start the sync process, the same icon is also available in all synchronized jobs. There, via a menu, either the synchronization for this one job can be triggered or the synchronization for this job or project can be paused.
If synchronization is paused in a job or project via the context menu, no more changes are taken over from Easyjob. This is particularly helpful if manual changes are made in CrewBrain that no longer match the data originally transferred from Easyjob.