1C
The agent works with any configuration on the 1C:Enterprise 8 platform that can publish the standard OData interface: standard, customized or fully bespoke. No code is added to the infobase: the agent reads the schema of the published objects, filters documents, takes balances and turnovers from registers and, given the rights, creates and posts documents.
Scenarios for standard configurations are on the integration page.
What the agent can do
| What you need | How it connects | What it gives |
|---|---|---|
| Infobase data | OData publication, the 1C:Enterprise card under Integrations | catalogs, documents, registers, files attached to documents, writing and posting |
| Print forms, reports, events | The Samreshuuu configuration extension on the same publication | UPD, TORG-12, invoice and act as files, DCS reports, infobase messages about posting and writing |
| An infobase with no internet address | The internal publication address and the app on a computer on the same network | the same as above, without opening the infobase to the outside |
Files attached to documents
The agent finds files attached to a document or a catalog item (an invoice scan, an expense report receipt, a contract) and reads their contents. It works out where they are stored from your infobase schema: a document may have its own attached files catalog, or there may be a shared Files catalog with versions.
For the read to work, every link has to be in the OData composition and in the user's rights: the file card catalog, the version catalog (if there is one) and the register that holds the file data itself. If even one is missing, the agent names the whole set of objects to open, not just the first one that refused.
Find the October expense reports in @onec and send the list of receipts attached to them. If some files cannot be read, name the rights that are missing.
Before you start
What has to be ready before connecting:
- an infobase on the 1C:Enterprise 8 platform published on an IIS or Apache web server with the standard OData interface; Designer is needed only for the first publication;
- infobase administrator rights, to add objects to the OData composition and create a user;
- an address the infobase opens at: from the internet over HTTPS or, for an infobase in the office, an internal address and the Samreshuuu app on a computer on the same network (below);
- for print forms, reports and events: a configuration built on SSL, to install the configuration extension.
Steps
Publish the infobase with OData
In Designer: Администрирование → Публикация на веб-сервере (Administration, Publish to web server), tick the standard OData interface and publish to IIS or Apache. If the infobase is already published for the web client, you can extend that publication instead of creating a new one.
Add the objects to the OData composition
In the infobase open «Настройки стандартного интерфейса OData» (Standard OData interface settings), the «Состав» (Composition) tab, tick the catalogs, documents and registers you need and save. An object outside the composition stays invisible to the agent even when the rights are there. If you are signed in to the infobase as an administrator in the browser, the agent can do this itself.
Create a dedicated 1C user
Give it the OData remote-access right and only the read or write rights the work needs. The agent sees exactly what this user is allowed to see.
Connect it under Integrations
Open Integrations, the 1C:Enterprise card, and fill in 1C base URL, Username and Password. The address field takes the publication root, the OData address or the address from the browser. Several infobases on one server connect as separate cards and differ by the publication path.
Read the OData composition of my @onec infobase and list which documents and registers are actually available. Do not change anything.
An infobase on a local network
If the 1C server is reachable only inside the office, there is no need to publish the infobase to the internet.
Install the app on a computer on that network
Download the app from the download page and sign in. The computer has to open the infobase by its internal address.
Enter the internal publication address
In the 1C:Enterprise card the 1C base URL field also takes an internal HTTP address. Below the field you will see Requests go through your computer.
Keep the app open
Requests to the infobase go through the app on that computer from any of your chats. While the app is closed or the computer is off, the agent cannot reach the infobase and says so.
Infobase events do not depend on the computer: the 1C server sends them itself and needs only outgoing HTTPS. More on working through a computer: Apps.
An infobase in 1C:Fresh
In 1C:Fresh the infobase is already published, so you do not publish it yourself. Paste the infobase address from the browser into 1C base URL: it carries the area number, which tells several infobases of one account apart. The OData composition and the connection user are set up inside the infobase the same way as in the steps above. In the service model the configuration extension gives printing and reports, while infobase events are not available there.
Permissions to grant
Visibility is limited twice: by the OData composition and by the user's role. The agent tells the two apart: an object outside the composition has to be added on the Composition tab, a refusal by rights means the role has to be extended.
- Read only: read rights on the catalogs, documents and registers you need. With such a user the agent changes nothing in the infobase, even if you ask it to.
- Writing: rights to add and modify the documents you need, plus the right to post them for posting. A created or modified document stays unposted until the agent posts it as a separate action.
- Configuration extension: the role «Сам Решу: доступ агента» (
срш_ДоступАгента) and the Use right on the reports you need.
In configurations built on the Standard Subsystems Library (SSL) the role is not assigned directly: add it to an access group profile (Администрирование → Настройки пользователей и прав → Профили групп доступа) and include the connection user in a group with that profile.
What to do after changing rights
Ask the agent to repeat the request. There is no need to reconnect: the right belongs to the 1C user, not to the password, so saving the login and password again opens nothing. If you installed or updated the configuration extension, restart the program as the Extensions form suggests. If you changed the web server publication, restart the web server.
Why the agent sends one request at a time
A 1C license gives a user one connection: a second simultaneous request breaks the first. So the agent talks to the infobase sequentially, and a large selection takes longer than in other services. When the agent opens the web client in the browser, that also takes a license, so it avoids reloading the page.
The Samreshuuu configuration extension
The extension adds what the standard OData interface lacks:
- print forms of documents as PDF, XLSX or MXL files, the same print commands the program offers to attach to an email;
- DCS reports as a file or a table for calculations;
- infobase events: posting, unposting, writing and deleting the documents and catalogs you choose. They trigger tasks: "when a sale is posted, send the buyer the invoice".
The extension changes nothing in the objects of your configuration and runs in safe mode. It needs a configuration built on SSL.
Download the .cfe file
In the 1C connection card click Download configuration extension, or open Settings → Apps → 1C and click Download .cfe. The compatibility mode the extension fits is shown next to it: check that your configuration's mode is not lower.
Add it under Extensions
As a user with full rights: Администрирование → Печатные формы, отчеты и обработки → Расширения → Добавить из файла (Administration, Print forms, reports and data processors, Extensions, Add from file). Keep the Safe mode checkbox and restart the program.
Publish the extension's HTTP services
In the same web server publication turn on publishing HTTP services and extension services by default, then restart the web server. The extension service shares its address with OData; no separate account is needed.
Check the connection card
The Print forms and reports line should read Installed with a version number. Configuration extension HTTP service not found means the extension is not published or the web server was not restarted after installation.
Infobase events
Samreshuuu writes the event delivery address and the signing secret into the infobase itself when connecting, and the sending scheduled job turns on by itself. Which documents to report is set by the agent for a specific task with your consent; while the list is empty, the infobase sends nothing.
For events to arrive, the 1C server needs outgoing HTTPS access to the app's address. In the client-server mode the extension needs a security profile that allows privileged mode and this internet resource. In the service model (1C:Fresh and other infobases with data separation) printing and reports work, while events are not available.
| What the card shows | What it means |
|---|---|
| "1C could not send events. Another attempt is scheduled." | a temporary network or delivery failure, the infobase retries by itself |
| "1C blocked outgoing events…" | the scheduled job or work with external resources is turned off |
| "1C stopped sending events after the receiver rejected a delivery…" | delivery was refused, no new events are arriving for now |
Limitations
Creating a document, editing it and posting it change your accounting data, so action auto-review checks them. Ordinary work on your request goes ahead by itself, while risky actions and anything under your "Ask first" rules arrive in the chat as a card. In a work organization the administrator can assign document posting to a role.
Before a bulk change ask for a list without changes and a pilot on a few documents first: Approving actions.
What "outcome unknown" means
Sometimes 1C does not answer a write or answers with a server error, and the transaction in the infobase still commits: a document read as unposted right after the error turns out posted later. The agent calls such an outcome unknown: the write may have landed.
To avoid a second document or a double posting, the agent:
- does not repeat such a write blindly;
- reads the document again first: if it is posted, the write counts as done;
- repeats only what certainly did not apply;
- if it could not check, says plainly "outcome unknown" and carries on with the other steps.
This protection has no switch: a blind repeat can duplicate a document or its movements, and that would have to be fixed by hand. Editing the task, a manual restart or lifting a pause does not release it; only checking the document itself does.
What to do: open the document in 1C and see whether it was created and posted, and whether there is a duplicate next to it. Tell the agent what you see: "the document is created and posted, carry on" or "there is no document, create it again".
How to revoke access
- On our side: click Disconnect on the 1C:Enterprise card. Agents stop calling the infobase.
- In 1C: disable the connection user or remove its OData remote-access right. This closes access even if the connection on our side remains.
- The configuration extension is removed under Администрирование → Печатные формы, отчеты и обработки → Расширения (Administration, Print forms, reports and data processors, Extensions).
Troubleshooting
- An empty answer or the object is missing from the schema: the object is not in the OData composition. Add it on the Composition tab.
- "Access denied by 1C rights": the user's role has no right to the object. Extend the role or the access group profile; there is no need to reconnect.
- A PDF print form is not produced on a Linux server: the 1C server lacks fonts, while XLSX is still produced.
- A report is not in the list: the agent builds only DCS reports the user has the Use right on.
- Anything else: Connecting services and Frequently asked questions.
Frequently asked questions
What do I need to connect 1C?
An infobase published on a web server (IIS or Apache) with the standard OData interface, the objects added to the OData composition, and a dedicated 1C user with the rights the work needs. Under Integrations open the 1C:Enterprise card and enter the publication address, that user's login and password.
The agent says access is denied by 1C rights. What now?
The login and password are fine; 1C itself refused, because the user's role has no right to that object. Grant the right in the access group profile or the role of the 1C user and ask the agent to repeat the request. There is no need to reconnect: saving the same user's password again adds no rights.
Why the configuration extension if OData is there?
OData serves the infobase data. Print forms (UPD, TORG-12, invoice, act) as files, DCS reports and infobase events (a document was posted, a catalog item was written) come only from the Samreshuuu configuration extension. Without it the agent reads and writes data but does not print and does not learn about changes on its own.
The infobase is in the office and not reachable from the internet. Can I connect it?
Yes. Enter the internal publication address and keep the Samreshuuu app open on a computer on that network: requests to the infobase go through it, and the infobase does not have to be opened to the outside.
What does "outcome unknown" after a write to 1C mean?
1C did not answer, or answered with a server error, and the write may still have landed. The agent does not repeat such a write blindly: it reads the document again first and repeats only what certainly did not apply. If it could not check, open the document in 1C and tell the agent what you see.
See also
Didn't find an answer? How to reach us