Sending SMS in Bitrix
本帖最後由 shuklarani41423 於 2024-11-9 15:04 編輯Sending SMS in Bitrix allows you to inform the client about upcoming or completed events, ask to perform certain actions, send links and necessary data, send out promotions, and recover passwords. We can say that the possibilities are limited only by your imagination, or more precisely, by the requirements of the business sector. To send the first message, you need to complete just a few steps. Please note that this applies not only to SMS mailing in Bitrix, but also by analogy with any other CMS. First, let's outline the task: when a user registers on the site, he should receive a notification on his smartphone. Let's take a closer look.
Step 1. Code to track user registration.
When a visitor creates an account on the site, two events are generated:
OnBeforeUserRegister.
OnAfterUserAdd.
Of course, there are some differences between them, but we will not consider them in this on page seo service article. We simply choose the second option - OnAfterUserRegister. Although if site visitors do not register, but are added by other users, then you can create a handler for both events at once.
https://afbdirectory.com/wp-content/uploads/2024/10/On-Page-SEO-Service-scaled.jpg
To set it up, place the code on a random page:
Pay attention to one of the mandatory points - PERSONAL_PHONE. If you miss it, the message will simply not be delivered.
If there is no init.php file in the /local/php_interface/ folder, you need to create it. Next, assign the event handler:
This completes the preparation, so let's move on to the next point.
Step 2. Sending SMS to Bitrix 24.
Prostor Mobile Marketing Agency specialists have developed an application that allows sending messages directly from Bitrix24. To automatically send notifications, you can integrate SMS mailings from Prostor SMS into your application, website or CRM system. We suggest using our secure API protocols or ready-made widgets and modules for your CRM systems. To start sending SMS via Bitrix, register on the website, download the application, log in to the system and set the signature. Integration takes a couple of minutes, after which you can proceed to sending SMS via Bitrix. To evaluate all the benefits, you can use the free trial period for 50 days.
Step 3. Adding the Bitrix message sending code to the handler.
Sending is done via https (curl):
Since we are talking about regular SMS sending, the code is simplified as much as possible and therefore it takes up so few lines. Bitrix messages require login and password initiation — SMSC_LOGIN and SMSC_PASS. It is recommended to write them in the dbconn.php file or output them separately and connect them in init.php.
LANG_CHARSET is a Bitrix constant, and $arFields['PERSONAL_PHONE'] is the field in which the user specifies the phone number.
SMS Scenarios
Bitrix 24 SMS allows you to set up a convenient and fast communication channel with the client. Let's consider how to do this from the element card:
Select the CRM tab from which you want to send a message to the client.
Enter text, if necessary, attach a file.
Clicking the "Submit" button.
Sending SMS in Bitrix
Sending SMS in Bitrix
Sending a message with a link to pay for the transaction
When purchasing goods and services, the client calls the manager, who creates a transaction, specifies the names in it and immediately sends a payment link directly from the card.
Sending SMS in Bitrix
The text of the message can be edited. To do this, click on the pencil icon. Next, you need to attach a link to pay for the product or service and send the message to the client. The manager controls whether the funds have been deposited directly in the transaction card.
頁:
[1]