Skip to main contentA-REX Foundation

المساعدة · 12

Connect your ERP and other systems

Let your ERP send harvests and deliveries to A-REX and receive events back, with your own identifiers, and try it all in a sandbox first.

متوفر بالإنجليزية فقط
هذه الصفحة بالإنجليزية. فصول الورقة البيضاء والمخططات وصفحات المنصة مترجمة؛ وتتبع مقالات المساعدة لغات المساعدة في وحدة التحكم. يبقى المعيار المعياري في المستودع؛ استخدم طلب وصول مبكر لذلك النص. وتبقى أدلة تصميم النظام وسجلات القرارات بالإنجليزية.

Your ERP already knows your harvests, receipts and shipments. Connecting it means nobody types them twice. Everything lives in Settings › Integrations, in five tabs: Webhooks, Inbound, Machine clients, IP addresses and Credential identity (the identity your product passports are signed with, see Credential identity). Owners and admins set up connections in production companies; in a sandbox, operators can set them up too.

Whatever comes in from another system never acts by itself: it becomes an event, a draft or an approval, and a person must approve it.

Choose the right way

You want…Use
your ERP to send goods receipts, deliveries or lab results to A-REXInbound
A-REX to tell your ERP when a lot is registered, delivered or certifiedWebhooks
your system to call the A-REX API on its ownMachine clients
to load a spreadsheet of recordsfile import (below)

Receive messages from your ERP

  1. In Inbound, select Add inbound endpoint.
  2. Sender: name it (for example "ERP goods receipts") and choose How the sender signs.
  3. Access and limits: optionally restrict Allowed sender addresses, and set the message size and rate.
  4. Sample message: paste a typical message. Its fields become the expected format.
  5. Select Create and confirm with your authenticator code. Copy the Address and the secret into your ERP: the secret is shown only once.

Messages that do not match the expected fields are Quarantined. Open one to Check again after fixing the fields, or Discard it.

Send events to your ERP (webhooks)

  1. In Webhooks, select Add endpoint.
  2. Destination: a name, the https URL of your system and the Format (CloudEvents (recommended) or Plain JSON). Tick Automations may send to this endpoint if automation steps should post to it.
  3. Events: Start from a preset (Everything about lots, Approvals, Reports, Directory changes, Only problems, Lot rules and add-ons), or pick events by group. For example, Delivery waiting and Delivery failed tell your ERP when an approved delivery is held up or cannot be made.
  4. Review, then Create. Copy the signing secret. A-REX sends a verification request, and the endpoint becomes Active when your system answers it.

An endpoint receives the events of its own company: real events in a production company, practice events in a sandbox. Messages carry identifiers and links, not names. Each endpoint lists its Deliveries with every attempt; failed ones are retried, and Recover / replay missing sends again what your system missed. Allow the addresses in IP addresses in your firewall.

Check that a message comes from A-REX

Every webhook message is signed with the endpoint's secret, which starts with whsec_. Your system must check that signature before it trusts a message. Open the endpoint in Webhooks: the Verify signatures panel gives ready code in TypeScript, Python, Java and C# for your IT team to copy. During a Rotate secret, both the previous and the new secret are valid for the overlap you choose, so pass both to the check.

Machine clients

In Machine clients, select Create client, choose its Access (Read, Propose) and its Sign-in method: Private key (recommended) or Client secret. No access can approve: what a system proposes waits for a person. Client secrets and API keys say which kind of company they belong to: they start with arex_cs_prod_ or arex_cs_sandbox_, and arex_sk_prod_ or arex_sk_sandbox_, so a practice key is never mistaken for a production one. Keys made before still work.

API and event descriptions

For your IT team, A-REX describes its API in OpenAPI 3.1 and every webhook event in AsyncAPI 3.0. Both are generated from the platform itself, so they match what it accepts and sends. Your developers can ask for the current files in Support, then connect with a machine client.

Your own identifiers

Parties, sites and products can carry your company's own identifier, the code they have in your ERP. Your integration can then look up a producer, farm or product by your code, and messages can include it, so your ERP never has to learn A-REX's identifiers.

File import

File import (CSV) of harvest receipts, deliveries, lab results and directory entries is being added to Integrations. It checks every row first and lists the errors, then creates pending approvals, never direct changes.

Practise in a sandbox

Try everything before your production company uses it:

  • Create a sandbox from your organization: New company › A sandbox. It is a practice company with fictitious data, and its endpoints receive its own events: approve a practice harvest and see the real message arrive. Operators can add endpoints there; in a production company, endpoints need an owner or admin and their second factor.
  • On an endpoint, select Send a sample event to send a signed example, marked as a sample, and see the exact request and answer.
  • An automation's test run only simulates its messages: nothing reaches your live systems. See Automations.