LAGA 得拉卡 (Delaka) Alkaline Mineral Water — Sales Distribution Platform
Sales distribution system for LAGA 得拉卡, a Taiwanese alkaline mineral water brand: LINE Bot ordering + PAYUNi encrypted payments + a 3-role sales commission back office + 3 sales rep recruitment flows. Recruiting, ordering, payment collection and payout all run through one LINE flow.
- Client
- LAGA 得拉卡
- Industry
- Food / beverage
- Service
- AI ERP
- Led by
- Johnny Yang

What we delivered.
- All in one LINE flow
- Recruiting, ordering, payment collection, payout
- Sales tiers
- 3 tiers (admin / supervisor / sales rep)
- Recruitment methods
- 3 methods (scan QR / pre-registered phone / LINE upgrade)
- Ordering channel
- Primarily the LINE Official Account
01What the client actually looks like
LAGA 得拉卡 (Delaka) is a Taiwanese alkaline mineral water brand (lagawater.com). They sell D2C. The sales team is out in the field finding customers, and customers place orders on LINE. This is the most common setup for D2C beverage brands in Taiwan. It is also the setup traditional ERP systems serve worst.
They did not come to us to "buy another ERP." They wanted one complete sales distribution system, running from LINE Bot ordering to commission calculation in the back office.

02Why we took this project
The GTM path for D2C beverage brands in Taiwan is extremely LINE-native. Reps add customers on LINE. Customers order in LINE groups. They want to check out and pay inside LINE too. If the system doesn't follow that real path, reps get forced to "tell the customer to order on the website." The result is lost orders.
Our call was simple: hide the complex back-end logic (multi-tier sales structure, commission settlement, refunds, PAYUNi encrypted payments) behind the LINE Bot. Reps and customers only ever see a LINE conversation. The web version keeps only the minimum entry point required for payment compliance.

03What we delivered
1. Multi-step LINE Bot ordering
Product selection → quantity (Chinese numerals supported: "兩箱" [two cases], "十瓶" [ten bottles]) → shipping address → payment method → confirmation, all inside a LINE conversation. Behind it, the line_carts table stores conversation state, and the line-webhook edge function handles every message event.
Reps and customers don't have to learn any new interface.
2. PAYUNi encrypted payments (AES-256-GCM)
PAYUNi, a Taiwanese payment gateway, is not plug-and-play like Stripe. It uses AES-256-GCM (not CBC). The encryption format is hex(base64(ciphertext) + ':::' + base64(gcm_auth_tag)). HashInfo is SHA256(hash_key + EncryptInfo_hex + hash_iv) in uppercase. The key must be trimmed and zero-padded to 32 bytes. The IV is used as-is.
We got the whole SDK running on Supabase Edge Functions (Deno):
payuni-payment(builds the encrypted form)payuni-redirect(auto-redirect page for payments triggered from LINE)payuni-notify(PAYUNi server-to-server webhook)payuni-refund(credit card refunds via trade_close)
Credentials are not stored in env. They live in a JSONB column in the app_settings table. The admin can swap keys in the back office without a new release.
3. Three-tier commission sharing + three recruitment paths
In a D2C model, the rules for sales commission get very detailed:
- Three tiers:
admin(the company) /supervisor(regional manager) /sales_rep(sales rep), with capped commission splits up and down the chain - Three recruitment paths (after the 2026-05-16 hardening):
- A1 Self-serve QR: A rep shares the
/recruitQR → token is attached automatically → one LINE message, "加入業務_T{token}" ("join sales"), activates the account instantly - A2 Pre-registered phone: The company admin enters the phone number in advance → the rep types "綁定 09xx" ("bind" + phone number) in LINE and binding happens automatically
- A3 LINE upgrade: The admin picks a LINE follower in "Customer Management" → clicks "Set as sales rep" to upgrade them
- A1 Self-serve QR: A rep shares the
- Every path is controlled by RLS + edge functions (
create-sales-rep/review-application), so edge cases don't turn into holes
4. Commission settlement and order back office
The 3 roles see different dashboards:
- Sales rep: their own customers, their own orders, their own commission
- Regional manager: rollup of the reps under them
- Admin: company-wide rollup + settings (products / LINE Bot / PAYUNi credentials)
Commission is calculated in real time, with monthly CSV export. Refunds claw back commission (triggered by the PAYUNi trade_close webhook).

04How we work
LAGA 得拉卡 asked the same of us as 富迪斯 (Fudisi): handle the whole thing, end to end.
Recruitment flow design (that's business logic, not engineering), LINE Bot conversation scripts, PAYUNi integration, back-office commission logic: all of it was done at Brightstream. We adjusted several times based on feedback from the client's sales team. One example is the 2026-05-16 hardening: the original recruitment flow let the admin create a sales_rep directly. We later made LINE binding the activation moment. That stopped dead accounts that were created and never used.

05Why this project is worth writing up
The D2C sales distribution market in Taiwan is large. Beverages, health supplements, cosmetics and skincare all run this way. The options on the market are patchwork like "a Chunghwa Telecom sales app + an order form," or heavy ERPs like SAP/Oracle that don't fit.
Brightstream's LINE Bot + PAYUNi + Supabase stack is the best fit for this vertical: LINE-native + custom-built commission logic + affordable for a mid-sized company. With LAGA 得拉卡 running, this know-how transfers directly to the next D2C food and beverage client. For us, that's vertical leverage.
Our sales reps are always out in the field, and our customers are all on LINE. They can't work with a traditional ERP back office. Brightstream got that. So LINE Bot ordering through to commission calculation in the back office is one chain, not two systems forced together.


