Synchra.24
menu_bookDocumentation
Practical guides for setup and development

Find guides for getting started, building workflows and adding your own tools to your company workspace.

folderEmbedded services

Editor of services and AI

Creating an embedded service, code editor, preview, AI assistant, and publishing a draft.

Machine translation

In Administrator → Services You can connect a ready-made application via a link or create an embedded service. The built-in service runs inside Synchra24 and does not require a separate application server.

Two connection methods

By linking to the server — connect an application that is already hosted on your website. Specify its name, address, and employee access.

HTML, CSS, and JavaScript — creating an application in the Synchra24 editor. You can download ready-made files, import a ZIP template, or ask an AI assistant to prepare the code. A company can have up to 100 active embedded services.

To manage services, you need the ability to Applications the subscription also includes the right to edit the services. The AI assistant also needs AI Assistant. The administrator chooses which employees have access to the service.

After saving or publishing, a notification with the result will appear. If an error occurs, the changes can be checked and saved again.

Editor

Create an embedded service and specify the name and icon. Under the name, you can add optional description of up to 300 characters. In the web version, it will appear under the heading of an open service. If the description is not filled in, the additional line is not shown.

If necessary, set the authorization and select employees with access. If the list of employees is empty, access is not limited to specific people, but the role requirements continue to apply. The name, description, and access can be changed later in the service settings.

When creating and in the service settings, set the display platforms: Allow in the web version and Allow in the mobile version they work independently. For the widget, they are located in the bar Widget Settings, for a regular service — Service availability. By default, mobile display is enabled, web display is disabled; existing services retain the previous web display. Shutting down a platform hides the service on it, saving the code, data, and the ability to be edited by the administrator. These settings do not replace the subscription and employee access requirements.

Tabs are available in the editor:

  • HTML — page content;
  • CSS — page design;
  • JavaScript — page behavior and working with data;
  • Variables — general data for the code of a specific service in the company;
  • Events — definitions of events called from the code for launching automations.

Editors support code highlighting, indentation, and block folding. Embedded libraries and working with data are described separately in the article. "Code, libraries, and SDK".

Button Download the code from files allows you to select HTML, CSS, and JavaScript. You can upload multiple files, but only one file of each type. They will replace the contents of the corresponding tabs. If the download fails, the old code will be saved. The total amount of sources is up to 5 MiB.

After downloading, check Preview then save the draft. Uploading files by itself does not change the working version of the service.

Button Export the code to ZIP downloads the code from the editor, including unsaved edits. The archive can be used as template for a new service. Employee access needs to be configured anew. The export does not save or publish the service.

Button Format it Indents and aligns HTML, CSS, or JavaScript in the panel of each editor. If there is a syntax error, the source text is saved, and the editor shows the reason. Formatting does not save or publish the service automatically.

Examples of working with data, theme, and libraries are given in the article. "Code, libraries, and SDK".

Preview

The preview shows how the service looks on the phone screen. There is a message and error bar nearby that helps you check its operation. On a narrow screen, it is located below the preview.

The preview uses test artifacts. The company's operating data does not change during such verification. Example of test data:

{"warehouse.stock":{"items":[{"sku":"A01","quantity":12}]}}

Button Update the preview restarts the check with the current code and test data. The same action performs Ctrl+S (Cmd+S on Mac) when the cursor is in the editor. This updates the preview, but does not save the draft or publish the service.

AI Assistant

The starred button opens the AI assistant. Describe what the service should do, for example: "Show the remaining items, add a search, and highlight the items that are scarce." The assistant will prepare a proposal based on the current code.

The AI returns a suggestion and a short description. Look at the suggested code and click Apply to Draft. Then check the preview, save and publish. The generation itself does not change the working version and does not grant additional rights to the user.

The proposed code is shown in separate tabs HTML, CSS and JavaScript with backlight and automatic formatting. You can fix it in the editor and format it with the button. A repeated request refines the proposed option. Button Apply to Draft transfers the code to the main editor; the current sources do not change before application.

It may take some time to prepare the proposal. Always check the result in the preview before publishing.

Working with events

Before requesting the AI, save the service and create the desired event on the tab Events. The assistant sees the events of the open service and can add their invocation to the code.

For example: "After preparing the report, add a button that sends the report_ready event. Show the result of sending and the error message."

If the desired event is missing or disabled, first create or enable it. Then send a new request to the assistant.

Return to the editor after reboot

After reloading the page, the same service and the same tab will open. The browser's "Back" and "Forward" buttons work. You can send the link to a colleague with access to the service.

Save the draft before restarting: unsaved changes are not transmitted via the link.

Draft and publication

Buttons Open, Save the draft and To publish they are under the editor. Publication is only available for the saved current code; after edits, save the draft first.

Save the draft creates a service or saves the next version of the source code. To publish makes the currently saved draft a working draft. If the changes are unsaved, the publication is blocked.

Before the first publication, the service is not displayed in the list of available employee applications. Subsequent changes to the draft do not affect the published page. Button Open opens the published version in the web version. If another administrator has already changed the draft, the system will ask you to update the data before saving it.

The current draft and the last published version are stored. The name, description, and access are changed in the service settings.

Other documents about embedded services

Topics transferred from this article

Code, libraries, and SDK.

Dashboard and card widgets.

Service variables.

Service Events.

Launching in the web version.

Importing and exporting ZIP templates.

Extension Store.