# 1С:ERP

Комплексное управление предприятием через OData

## Scenarios

### Covering customer orders
The agent matches customer orders against free stock and purchase orders and shows which lines are still not covered.

### Production order status
The agent shows which production orders are overdue, what stage they are stuck at and which materials for them are missing.

### Unit cost and output profitability
The agent pulls output and cost data, calculates the cost per unit and compares it with the shipping price.

### Plan versus actual by department
The agent brings planned and actual figures for the period together by department and shows where the variance went past the allowed range.

## How to connect

### Publish the ERP infobase with OData
In Designer: «Администрирование» → «Публикация на веб-сервере…» (Publish to web server), name it in Latin letters, pick IIS or Apache 2.4, tick «Публиковать стандартный интерфейс OData». Address: https://сервер/имя-публикации.

### Tick the objects in the OData composition
In the application: «Администрирование» → «Синхронизация данных» → «Настройки стандартного интерфейса OData» (Data synchronisation). On «Состав» click «Загрузить метаданные» and tick the objects; unticked ones stay invisible.

### Create a dedicated infobase user with a password
On the «Авторизация» tab of the same form add a service user with «1С:Предприятие» authentication — the «Удалённый доступ OData» role is granted automatically. Its login and password are the pair to write down.

### Verify the address and login on $metadata
Open https://сервер/имя-публикации/odata/standard.odata/$metadata with that login: an XML list of entities must come back. A 401 means the user lacks the role, empty XML means nothing is ticked on «Состав».

## FAQ

### How do I connect 1C:ERP?
With the publication address plus the login and password of a service user. The database is published on a web server with the option to publish the standard OData interface, objects are ticked on the Composition tab, and the user is created on the Authorisation tab.

### How is connecting ERP different from other configurations?
The method is the same, the scale is not: ERP has hundreds of application objects, so it is worth including only the sections you need in the publication. The agent reads object names from /$metadata before the first request.

### What data does the agent see?
Orders, production and purchasing documents, costs, accumulation and accounting registers, catalogues — within the OData publication scope and the role permissions of the connected user.

### Can the agent change documents in ERP?
Writing over OData is possible, but only with the matching role permissions. In a large ERP landscape it is wiser to connect a read-only user and let the responsible person make changes by hand.

[Open 1С:ERP](https://v8.1c.ru/erp/)
