Workflow Overview
To send a message, the client must provide the text, recipient phone numbers, a sender ID (displayed to the recipients), and a transactional parameter (indicating whether the message should reach recipients who have blocked messages from this sender ID).
The client provides this information programmatically (via HTTP API) or fills it out on the website. Once the system receives the request, it validates the provided information. Specifically, the system checks:
- Whether the sender ID belongs to the client.
- If the message text contains any prohibited words as per SMS center guidelines.
- Whether the phone numbers are formatted correctly (incorrectly formatted numbers are automatically filtered out).
- If the message text ends with an opt-out mechanism (for non-transactional messages).
- If the recipient list includes numbers that have blocked messages from this sender ID (for non-transactional messages).
After validation, depending on the client's preferences, short-form Georgian phone numbers may be converted to international format. If the client's data passes all checks, the system records the request and all messages within it in the database, marking them as ready to be sent.
The next step is to transmit each message to the SMS center. Communication between our system and SMS centers is conducted via the SMPP protocol. If necessary, the message text is split into units according to the protocol's standards.
Each unit is first stored in the database and then sent to the SMS center. If the operation is successful (i.e., the SMS center responds to the submit_sm command with esme_rok), our system deducts the cost of the unit from the client's balance and marks the corresponding message part as submitted to the SMS center.
Once the message parts are transmitted to the SMS center, the center becomes responsible for delivering them to the recipients.
Our program waits for delivery reports from the SMS center. Upon receiving these reports, the database is updated to mark the corresponding parts as delivered to their destinations.