Skip to main content

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.

Written from OneBox documentation

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​

  1. Open Flows → Connections, press Connect a system and choose OneBox.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Add the action in OneBox​

  1. Open the business process, go to its diagram and click the stage that should start a flow.
  2. In Actions press +, choose Send process to API (in the Ukrainian interface «Передати процес в API», in the Russian one «Передать процесс в API») and press Add.
  3. In the settings of the action paste the address from the cabinet. The name of the address field is not shown in the documentation.
  4. In the additional parameters of the action add the pairs "key → value" with exactly these keys:
KeyValue
eventa constant — the AlphaFlow event of this stage, for example order_paid (see Events)
onebox_process_idthe process field ID — the number of the order
phonethe phone of the client of the process
name, emailthe client's name and email — optional
client_idthe id of the client's contact in OneBox — optional
statusthe name of the stage or status — for order_status_changed and deal_stage_changed
totalthe amount — if the process has it
ttn, carrierthe tracking number and the delivery service — if the process has such fields
  • Keep the names event, onebox_process_id and phone: by them AlphaFlow recognises OneBox.
  • That a field of the client's contact can be chosen as the value of phone is 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 0 value 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 OneBoxAlphaFlow event (event)Properties
The order is placedorder_createdorder_id, total
The order is paidorder_paidorder_id, total
The order is shippedorder_shippedorder_id, ttn, carrier
The order is deliveredorder_deliveredorder_id
The order is cancelledorder_cancelledorder_id
Any stage of an orderorder_status_changedorder_id, status
A new leadlead_submittedorder_id
A deal moves to a stagedeal_stage_changedorder_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 ttn property, 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 with quota_exceeded and shown in the journal; the action in OneBox stays on.

OneBox documentation​