Skip to content

Technical Reference: Mass SMS

Entity: SMS

The module uses (extends) the Sms entity. In the context of this module, the Sms entity serves as a campaign definition, not as a record of a single sent message.

Fields

Name (System) Type Description
name Varchar Campaign/Message name.
body Text Content of the SMS message.
targetLists LinkMultiple Link to Target Lists.

Sending Logic (Service)

Class: Espo\Modules\MassSms\Services\Sms

The method sendMassSms($smsId, $targetListsIds) performs:

  1. Loading the Sms entity.
  2. Iterating through Target List IDs.
  3. For each list, loading relations: accounts, contacts, leads, users.
  4. Extracting phone numbers (phoneNumber).
  5. Filtering:
    • Removing duplicates (array_unique).
    • Checking phoneNumberIsInvalid.
    • Checking phoneNumberIsOptedOut (GDPR).
    • Checking empty numbers.
  6. Calling SmsSender -> TMobileSender.

T-Mobile Integration

Class: Espo\Modules\MassSms\TMobile\TMobileSender

  • Endpoint: https://aweg.t-mobile.cz
  • Authentication: Basic Auth (user/password from TMobile Integration).
  • Method: GET request with parameters auth, receiver, smstext.
  • Bulk ID: Generates a unique bulk ID for the message group during mass sending.
  • Number Normalization:
    • Removes spaces and non-numeric characters.
    • If starts with 00, keeps it (treats as international).
    • If starts with +, keeps it.
    • Otherwise, adds prefix +420.