Integrations
1C Integration
Connect M-TEH to 1C:Enterprise to retrieve client data, orders, balances, and stock levels directly in the conversation.
How it works
M-TEH sends HTTP requests to a 1C publication via REST or an HTTP service.
The 1C response is returned in the {{onec_response}} variable and available in subsequent nodes.
Graph[Trigger Widget]
↓
[AI Extract]
└─ fields: contract_number
↓
[1C Request]
└─ method: GetContractBalance
└─ params: {"contract": "{{extracted_contract_number}}"}
↓
[Action Reply]
└─ text: "Your balance for contract {{extracted_contract_number}}: {{onec_response.balance}}"
Connection parameters
| Field | Description |
|---|---|
Publication URL | Base URL of the 1C HTTP service, e.g. http://1c-server/erp/hs/M-TEH/ |
Username | 1C user with rights to call the service |
Password | Password (stored encrypted) |
Timeout | Request timeout in seconds (default 10) |
SSL Verify | Verify SSL certificate (disable for self-signed) |
Request and response format
M-TEH sends a POST request with a JSON body:
POST /hs/M-TEH/GetContractBalance{
"contract": "C-00001234",
"session": "nx-a1b2c3..."
}
1C should return JSON:
Response{
"balance": 15000.50,
"credit_limit": 50000,
"currency": "USD",
"status": "ok"
}
Response fields are available as {{onec_response.balance}}, {{onec_response.currency}}, etc.
Error handling
Use a Condition node to check for success:
Error guard[1C Request]
↓
[Condition: onec_response.status == "ok"]
├─ yes → [Reply: "Balance: {{onec_response.balance}}"]
└─ no → [Reply: "Could not retrieve data. Please contact a manager."]
Make sure the 1C server is accessible from the network where M-TEH is deployed. In cloud deployments, a VPN or reverse proxy may be required.