Skip to content

ERPNext

REST site used as master data (Item / products) and as HR source (Employee).

Connection: flows/connections/erpnext.yaml (type: http). Header token $secret:erpnext-api-key:$secret:erpnext-api-secret. Set base_url (no trailing slash). Allow the host in egress.http.allowed_hosts.

Capability: egress.http.call.

Employee extract (HR onboarding)

Scenario: HR employee onboarding.

Artifact Path
Workflow flows/workflows/hr_employee_extract_erpnext.yaml
Schedule trigger flows/triggers/hr-employee-extract-erpnext-schedule.yaml
HTTP trigger flows/triggers/hr-employee-extract-erpnext-http.yaml — POST /v1/api/hr/employee-extract-erpnext
Schedule flows/schedules/hr-employee-extract-erpnext.yaml (*/5 * * * *, disabled)
XSLT flows/artifacts/transforms/hr-employee/erpnext-employee-to-cdm.xslt
Sample GET body flows/artifacts/transforms/hr-employee/sample-erpnext-employee.json

Cursor key HR/Employee/ERPNext/watermark (filterDateTime / currentDateTime). Downstream: DSAV HR/Employee/New/1.0.

- id: fetch_employee
  type: service_call
  capability_name: egress.http.call
  path: /call
  connection: erpnext
  method: GET
  url: "/api/resource/Employee/{employee_id}"
  fail_on_error_status: true
  values:
    employee_id: "context:employee_id"

Item onramp and products (existing)

Same connection; CDM Item XML on meshflows.events.

Workflow Triggers Notes
erpnext_onramp erpnext-onramp-http — POST /v1/webhooks/erpnext/onramp JSON→Message XML, DSAV Item Create/Update. Operations start. Milestone received.
erpnext_onramp_item_subscribe AMQP Item Create + Update GET Item → XSLT CDM → MasterData/Products/Publish/1.0. Milestone completed.
erpnext_onramp_item_subscribe_delta AMQP Item Create/Update Postgres snapshot; Changed only on field diff. Milestone completed.
erpnext_products_publish erpnext-products-publish-http — POST /v1/webhooks/erpnext/products Webhook JSON → CDM → Publish.
erpnext_products_notify AMQP Publish 1.0 CDM → SMTP fellman.nl.
erpnext_products_delta_notify AMQP Changed Delta mail

Dashboard: flows/dashboards/erpnext-onramp.yaml (folder erpnext). Column: context.milestone on the onramp parent row (list-API rolls up the latest written milestone in the chain). Workflows themselves are unchanged aside from the type: milestone writes.

XSLT: flows/artifacts/transforms/erpnext/item-to-cdm.xslt. Edge routes: flows/edge-routes/erpnext-onramp.yaml, erpnext-products-webhook.yaml.

Secrets

  • erpnext-api-key
  • erpnext-api-secret