OneBox
OneBox is a CRM built on business processes. A stage of a process runs actions when an order or a deal enters it, and one of them, Send process to API, sends the parameters you list to an address. Pointed at the Flows address, it starts your flows: an order is paid, shipped or delivered, a deal moves to the next stage — and the customer gets the right message in Viber or SMS, with a reminder if nothing happens.
This page is written from the public documentation of OneBox and its forum — the action itself is described only on the forum — and has not been checked on a live account yet.
What you need
- Access to the business processes of OneBox: the action is set on a stage of the process diagram. Whether stage actions depend on the plan or on a paid add-on is not confirmed by the documentation.
- One action per stage: the stage "paid" sends one event, the stage "shipped" another. All of them use the same address — the event is set by a parameter.
Step 1. Create a connection
- Open
Flows → Connections, press Connect a system and choose OneBox. - Press Copy address. It looks like
https://events.alphasms.net/hooks/<TOKEN>— keep it secret.
Step 2. Add the action in OneBox
- Open the business process, go to its diagram and click the stage that should start a flow.
- In Actions press +, choose Send process to API (in the Ukrainian interface «Передати процес в API», in the Russian one «Передать процесс в API») and press Add.
- In the settings of the action paste the address from the cabinet. The name of the address field is not shown in the documentation.
- In the additional parameters of the action add the pairs "key → value" with exactly these keys:
| Key | Value |
|---|---|
event | a constant — the AlphaFlow event of this stage, for example order_paid (see Events) |
onebox_process_id | the process field ID — the number of the order |
phone | the phone of the client of the process |
name, email | the client's name and email — optional |
client_id | the id of the client's contact in OneBox — optional |
status | the name of the stage or status — for order_status_changed and deal_stage_changed |
total | the amount — if the process has it |
ttn, carrier | the tracking number and the delivery service — if the process has such fields |
- Keep the names
event,onebox_process_idandphone: by them AlphaFlow recognises OneBox. - That a field of the client's contact can be chosen as the value of
phoneis not confirmed by the documentation — check it on the test. - According to the OneBox forum, the action sends the pairs as a flat JSON. An empty field of the process comes as an
empty string. A
0value is sent too: earlier OneBox dropped it, and on the forum it reported the fix.
Step 3. Send a test
Move a test order with your own phone number to the stage with the action. The event appears in
Flows → Connections → Event journal within seconds, and the
connection shows Recognised: OneBox. The connection also shows the last request as it came: check that the phone
is there.
Events
| Stage in OneBox | AlphaFlow event (event) | Properties |
|---|---|---|
| The order is placed | order_created | order_id, total |
| The order is paid | order_paid | order_id, total |
| The order is shipped | order_shipped | order_id, ttn, carrier |
| The order is delivered | order_delivered | order_id |
| The order is cancelled | order_cancelled | order_id |
| Any stage of an order | order_status_changed | order_id, status |
| A new lead | lead_submitted | order_id |
| A deal moves to a stage | deal_stage_changed | order_id, stage |
order_id is the value of onebox_process_id; status and stage are the value of status. The contact is found
by phone, email and client_id, the first name comes from name. For order_status_changed and
deal_stage_changed the value of status can be turned into another event by the status table of the connection,
which is empty at first. If you named the keys differently, correct the mapping in the connection. The names of the
events are the ones the ready-made templates expect — see Recommended events.
A name like order_paid or order_shipped goes only into the action of that very stage: order_paid — only on the
stage where the order is paid. The actions of the other stages send order_status_changed or deal_stage_changed
with status: otherwise an order moved to another stage reaches the customer as "paid".
Good to know
- The OneBox documentation describes neither repeats nor the method and the headers of the action, nor nested JSON — that is why the keys are flat. The action has no signature; the secret in the address is enough.
- An event is identified by the process, the event and the status: the same order entering the same stage with the same status again is taken for a repeat and is not recorded twice.
- The tracking number is passed as the
ttnproperty, like any other: AlphaFlow does not track the parcel. - The address always answers
200. Above the daily event limit the event is refused in AlphaFlow withquota_exceededand shown in the journal; the action in OneBox stays on.