Business apps

WhyBiz: CRM and automated messages

Setting up WhyBiz: channels, customers and custom fields, the contact and order API, scenarios, bulk sends, invoices, surveys, the content calendar and webhooks.

What is WhyBiz?

WhyBiz (whybiz.ir) builds a file for every customer from site purchases, messages, invoices and surveys and messages them at the right time through scenarios — on Telegram, WhatsApp Business, Instagram, Bale, WhyCloud Messenger or SMS. In the console it is under Apps → WhyBiz, and the Overview page lists the setup steps.

Connect channels

Console → WhyBiz → Channels. Telegram and Bale: create the bot with BotFather and paste the token; the inbound webhook is set automatically, and to publish in a channel make the bot its admin. WhatsApp: the Phone number ID, a permanent token and the App secret from Meta for Developers; then put the Callback URL and Verify token shown in the console into the app’s Webhooks. Instagram: the Business or Creator account id and a Graph API token. SMS: a Kavenegar or SMS.ir API key and sender line.

Customers

Customers are created by hand, from CSV, from site forms, from messages arriving on channels or through the API. Phone, email and site id are unique: when one already exists the same file is updated. Every file has a timeline of purchases, messages, invoices, surveys and team notes, with message, invoice and run-scenario actions.

Custom fields

Under Custom fields, define what you keep about customers: seller (team member), in-store purchases (money), loyalty level (one option), interests (several options), contract date (date; Persian dates accepted), national id (unique). Fields may be required, shown as list columns and have defaults. They appear in the customer form, list filters, segments, scenario conditions, template variables ({{field.seller}}) and the API. Keys the API sent but nobody defined are stored as text and can be defined in one click.

API keys

Developers → New key. The wbz_… key is shown once. Every request goes to https://whybiz.ir/api/v1 with an Authorization: Bearer header and a JSON body. A customer is referenced by id, ext:site-id, phone:0912… or email:….

Add and update customers

POST /api/v1/contacts with name, phone, email, externalId, city, birthday, tags and fields creates the customer or updates an existing one (created tells which). POST /api/v1/contacts/bulk accepts up to 1000 customers. GET /api/v1/contacts searches by q, tag, stage, segment and field.key.

Change fields and tags, delete

PATCH /api/v1/contacts/phone:09121234567 sets values with fields, adds to or subtracts from numbers and money with increment, clears values with unset, and takes tags as a full list or as {"add": [...], "remove": [...]}. DELETE /api/v1/contacts/… removes the customer and their history. Fields themselves are defined, edited and deleted with /api/v1/fields (DELETE with purge=true also clears the values).

Orders and events

After each purchase send POST /api/v1/orders with number, status (pending, paid, shipped, delivered, cancelled, refunded), items and customer; change the status with PATCH /api/v1/orders/number. Orders update the customer’s total and count and start “after purchase” and “order delivered” scenarios. Other site events (cart, webinar sign-up…) are recorded with POST /api/v1/events, a name and properties, and start “site event” scenarios.

Scenarios

Scenarios → start from a preset: follow-up two weeks after a purchase, welcome, birthday, win-back, abandoned cart, unhappy customer, VIP. Set the trigger, a customer filter and steps: wait (days, hours, until a time), send, survey, invoice, tag, stage, set a field, condition (jump to a step or end), notify the team in Messenger and webhook. “Test on a customer” runs the scenario from the first step for one person.

Sending rules

Marketing messages wait out quiet hours (22:00–09:00 by default) and each customer receives at most two marketing messages a day (configurable). Words like “stop” and the unsubscribe link opt the customer out of marketing on that channel or all of them. On WhatsApp and Instagram, outside 24 hours after the customer’s last message WhatsApp sends only approved templates and Instagram falls back to the next channel.

Templates and bulk sends

Templates hold text with variables ({{first_name|dear customer}}, {{order.number}}, {{invoice.link}}, {{field.level}}…), media and up to three link buttons, plus the approved WhatsApp template name and parameters. A bulk send takes a segment and a template, shows the reach per channel before sending and goes now or at a set time; clicks and sales over the next 7 days are counted.

Invoices and surveys

Invoices are made from a customer file, an order or a scenario and have their own page with your payment link; views and payments are recorded. Surveys are NPS, purchase satisfaction or custom; every customer gets a personal link, unhappy customers are tagged and the “unhappy customer” scenario alerts the team.

Content calendar

The calendar shows a Persian month; press “+” on a day, choose the channel (Instagram or a Telegram or Bale channel), the kind (post, carousel of 2–10 media, story, reel or channel post), text and media, and schedule it. A failed publish shows its error on the post and is retried a few times.

Webhooks and forms

Developers → New webhook: events such as contact.created, order.paid, message.received, survey.answered and invoice.paid reach your server signed with X-WhyBiz-Signature (sha256=HMAC of “timestamp.body” with the secret) and X-WhyBiz-Timestamp, retried on failure. HTML forms on your site (name, phone, email, tags and field.key) post straight to the WhyBiz form address and create customers.

Related guides