Skip to main content

Smart Sender

Smart Sender is a platform for chatbots in messengers. Its funnels have the block External Request (Webhook): a request whose method, headers and JSON body you set yourself. Pointed at the Flows address, it starts your flows: a subscriber leaves a lead in the bot, fills in a questionnaire, pays or books a visit — and gets the right message in Viber or SMS, with a reminder if nothing happens.

Written from Smart Sender documentation

This page is written from the public documentation of Smart Sender and has not been checked on a live account yet.

What you need​

  • A Smart Sender funnel. The Smart Sender documentation does not name the plan of the block.
  • The phone of the subscriber. A messenger subscriber often has only userId; the phone is there if the subscriber shared it or it came from a form or a payment.
  • A connected messenger for notifications, to test the request: Smart Sender takes the test data from it.
  • One address for all funnels: the event is written in the body.

Step 1. Create a connection​

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

Step 2. Add the block to a funnel​

  1. In the funnel add the block Perform Actions → External Request (Webhook) at the place where the event should go.
  2. HTTP request method — POST.
  3. HTTP URL — the address from the cabinet. Do not add variables to it.
  4. HTTP headers — add nothing: User-Agent: Smart Sender and Content-type: Application/json are set by themselves.
  5. HTTP body — paste the body below. Change lead_submitted in event to the event of this funnel (see Events).
  6. Press Test request, then save the changes of the block.

The body:

{
"event": "lead_submitted",
"contact": {
"phone": "{{ phone }}",
"email": "{{ email }}"
},
"traits": { "first_name": "{{ firstName }}" },
"properties": { "smartsender_user_id": "{{ userId }}" },
"context": { "source": "smart_sender" }
}
  • The variable syntax {{ userId }} is from the Smart Sender documentation. The names {{ phone }}, {{ email }} and {{ firstName }} are not confirmed by it: take the names from the list of variables in the block itself.
  • The body has no message_id: Smart Sender documents no variable with the time or the id of the step, and an id like lead_submitted:{{ userId }} would drop every next such event of the subscriber for good. AlphaFlow accepts the event with the warning no_message_id.

Step 3. Send a test​

Press Test request in the block: the HTTP response window shows the answer of AlphaFlow, {"status":"success"}. The event appears in Flows → Connections → Event journal within seconds. The connection shows Recognised: Smart Sender.

Events​

What happens in the funnelAlphaFlow eventProperties
A lead or a contact from the botlead_submittedsmartsender_user_id
A questionnaire is filled inform_submittedsmartsender_user_id
A payment through a payment integrationorder_paid or payment_succeededsmartsender_user_id
A bookingappointment_scheduledsmartsender_user_id

Send order_paid or payment_succeeded only from a step that runs after a successful payment — not on an issued invoice or a failed payment: otherwise an unpaid order reaches the customer as "paid".

AlphaFlow takes the body as it is: the contact is the phone and the email from contact, the first name comes from traits. Nothing has to be mapped. The names of the events are the ones the ready-made templates expect — see Recommended events.

Good to know​

  • The Smart Sender documentation does not describe retries. There is no signature: the secret in the address is enough.
  • A subscriber with neither a phone nor an email gives an empty contact, and the event is refused with no_contact. If Smart Sender is your only source of contacts, you can add "external_id": "ss:{{ userId }}" to contact: once an event with the phone has come, later events of the subscriber are found by this id. An id AlphaFlow does not know yet still gives no_contact. With other sources it would not match their ids: a contact has one external_id.
  • 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 funnel in Smart Sender keeps working.

Smart Sender documentation​