by Brainvire Infotech Pvt. Ltd

Brainvire SMS Extension allows you to conveniently communicate with clients via SMS in SuiteCRM. Both incoming SMS and outgoing SMS are supported in this add-on with just a simple configuration. Other APIs outside of Nexmo, Plivo and Twilio can also be configured.

Cancel at any time!
Free Trial

#5504 - Opt-In and Opt-Out Questions

Open General Question created by JosephN one month ago

Do you have any Opt-In / Opt-Out integrations or functionality in the CRM and your Twilio Integration? For Opt-Out, I know that Twilio generally handles this and will reject any attempts to send an SMS to a number that has opted out via their Opt-Out process. What I am wondering is if your integration gets any API or Web-hook notification back from the Twilio process and marks an account, contact, lead, or phone number, etc... in some way that prevents the CRM from attempting to send an SMS so we don't lose money on sending an SMS that just ends up getting rejected?

Do you have any integration for opt-in, or will I need to manually handle this?

Thank you for your help.

  1. BrainvireInfotech member avatar

    Brainvire Infotech Pvt. Ltd Provider Affiliate

    one month ago

    Hello

    We do not have it currently in our plugin. But we are doing our R&D on the same. Will update you soon

    Thank You, Brainvire Team

  2. BrainvireInfotech member avatar

    Brainvire Infotech Pvt. Ltd Provider Affiliate

    one month ago

    Hello

    Sorry for delay in response. We have added Opt out process in our plugin and added the latest plugin in the store.

    We will be tracking Opted out numbers while sending SMS, if its opted out then we will not be sending message to that number\

    Please take the latest package from store and check it.

    Thank You, Brainvire Team.

  3. BrainvireInfotech member avatar

    Brainvire Infotech Pvt. Ltd Provider Affiliate

    one month ago

    Hello

    Were you able to test the new feature. Please let me know if you are facing any issue

    Thank you, Brainvire Team

    • JosephNewhall member avatar

      JosephN

      3 weeks ago

      I apologize for the delay, I did not see this response till today. I will download the new version and test it out. And give you feedback.

      Thank you.

  4. JosephNewhall member avatar

    JosephN

    2 weeks ago

    Ok, I have uninstalled my current version, I then downloaded the one from the store again, installed it, rebuilt angular files, and then did a quick rebuild and repair. I have added my webhook endpoint path to my Twilio messaging configuration. I am able to send SMS to my phone so at least base functions are still working after the update. However, I have a few questions, 1. Where does your plugin set the opt-out for a specific phone number?

    1. Where can I manually mark/unmark a phone number as opt-out? I have looked around since I installed the update but I don't see where to mark/unmark a phone number as being opted out. The only thing I see is where I can mark/unmark an account, contact, or lead email address as opt-out but nothing specific to phone numbers.

    2. If someone replies to an SMS where is that supposed to show up in the CRM? I tested to see what happens if someone replies to the SMS message they received, so I sent myself an SMS and then replied "Testing 1234". I expected to get a notification in SuiteCRM but I didn't see anything indicating the CRM received any response from Twilio. I even checked the Calls area, since you log the outgoing SMS there, thinking I might see the incoming SMS, but there is nothing there.

  5. BrainvireInfotech member avatar

    Brainvire Infotech Pvt. Ltd Provider Affiliate

    one week ago

    Hello Joseph

    sorry for delay in response. Addressing your two concerns below :

    1. Opted Out numbers we are managing in a table in back end which will store all the numbers that opts out by sending messages like STOP, CANCEL, UNSUBSCRIBE. We are not managing that in frontend. We can surely work on frontend by adding a new field. Will update you soon on that

    2. Did you configure Webhook in Twilio to receive SMS as mentioned in the documentation. Once you configure this then only we will start receiving the incoming message in CRM.

      Screenshot from 2024-11-15 08-02-40.png

    Thank You, Brainvire Team.

  6. JosephNewhall member avatar

    JosephN

    one week ago

    Thank you for the information on the opt-out numbers, I look forward to seeing your front-end changes for the SMS opt-out features. Regarding my Twilio integration, yes, I have entered my CRM's webhook URL for the incoming messages section of my Twilio account. I have also attempted to switch between HTTP and HTTPS protocol for the URL with neither working. Is there any way I can send a test to this endpoint using Postman? If you could give me the information on what the "receiveSMS" entry point is expecting for an HTTP request I could attempt to test it in a more controlled environment. Until then I will go look at the Twilio API and see if I can see what they send and maybe try to build a test request in Postman using that information.

    Thank you for all your help.

  7. JosephNewhall member avatar

    JosephN

    one week ago

    Quick update, I went and researched the Twilio API and created a basic HTTP request in Postman to test. It is a POST action to my "https://suitecrmURL/index.php?entryPoint=receiveSMS" endpoint (http protocol also works the same), I added the following fields to my form-data, From, To, and Body. These messages are now showing in the CRM Calls area however when you click on them they just pull up a blank screen with no data at all. I don't know if you are trying to match incoming SMS numbers to phone numbers assigned to accounts, contacts, or leads or if there is any extra form data that is expected that I am not sending in my test HTTP Request. Please advise, thank you.

  8. JosephNewhall member avatar

    JosephN

    one week ago

    One more thing, even though they showed up in the Calls area there was no CRM system notification, does your software provide a system notification when an incoming text comes in?

  9. JosephNewhall member avatar

    JosephN

    one week ago

    Ok more information, I logged in as the admin user and I can see the notifications. However, there are a few issues:

    1. When I click on them, just like when I click on them in the Calls area it takes me to a blank screen.

    2. Because I am the only one who would ever log in as admin AND I do not use that account as my primary account, no one else can see any incoming messages for any questions that may be asked in response to the outgoing SMS message.

    There needs to be a way to do at LEAST 1 of the following if not all 3 of the following: - Enable the incoming SMS alerts for ALL users. - Enable the incoming SMS alerts for a specific Role that can be assigned to specific Users. - Enable the incoming SMS alerts for Specific Users directly.

    1. The webhook for Twilio is still not working so I am creating a simple logging test webhook to use as a testing endpoint for Twilio so I can see if Twilio is even sending me the request or if there is something else needed in the Twilio setup that has changed since you created your integration.

    I will inform you of anything I discover regarding my Twilio webhook troubleshooting. However, I am reaching a point where I may have to choose to create and use my own endpoint to handle the opt-out functionality, incoming SMS notifications, and call logging until these things are addressed in a future update. Unfortunately, there is a good chance that by that time I may be instructed by our management team to abandon this SMS integration and create our own internal SMS integration for SuiteCRM so that we can move forward with our marketing and sales plans. I hope it doesn't come to that as I have invested a great deal of time both on and off the clock on this integration with our CRM so anything you can do to help me get this working I GREATLY appreciate it.

    Thank you for all your help.

    • BrainvireInfotech member avatar

      Brainvire Infotech Pvt. Ltd Provider Affiliate

      one week ago

      Hello

      Can we schedule a call on Monday to check the webhook issue. Can you please let me know your availability

      Thank you, Brainvire team

    • BrainvireInfotech member avatar

      Brainvire Infotech Pvt. Ltd Provider Affiliate

      one week ago

      Can you please let me know you are using Twilio trial account or paid number

      Can you please hit the webhook url that you have added in twilio directly in browser. Can you please let me know what did you observe by doing so

  10. JosephNewhall member avatar

    JosephN

    one week ago

    I have created my own web API endpoint for Twilio, I configured Twilio's Incoming Message webhook to use that URL., then I tested it by replying to the SMS I sent my phone via the CRM, and Twilio sent their response to my test endpoint and I successfully logged it so I know that Twilio is working. I suspect there may be a problem with your plugin endpoint or something else so I will check to see if there are any errors in the CRM or PHP log files this morning, test a few other things, and let you know.

    To answer your other questions: 1. I am using a paid number on Twilio and they have approved the campaign and opt-in /opt-out methods that we submitted to them. 2. When I attempt to open the webhook URL in my browser it just returns a blank page. This probably doesn't help much but I inspected it with the Dev View of my Chrome browser to see if there were any errors in the console, but there weren't any. Also looking at the response HTML all it had had was an empty HTML Header tag and an empty Body tag with the following attributes "data-new-gr-c-s-check-loaded="14.1207.0" and data-gr-ext-installed=""

    Thanks again for your help, I will let you know what else I find.

  11. BrainvireInfotech member avatar

    Brainvire Infotech Pvt. Ltd Provider Affiliate

    one week ago

    Hello

    Custom API is getting called and plugin API is not getting called is quite strange as its getting called from postman. I feel we need to take a call to solve this issue. We are not facing this issue at our end.

    1. On receiving SMS, call record is getting created but on opening its showing blank screen. We have resolved this issue and uploaded latest package in store.
    2. We have also updated our plugin to assign the desktop notification to the person who is receiving the message. With the new change, assigned to of Accounts/Leads/Contacts which has the number stamped in it will receive the notification
    3. We have added a new field Opt Out on Leads/Accounts/Contacts to mark it as Opted out.

    Screenshot from 2024-11-19 09-05-45.png

    For this we have added a scheduler, which will check all the customer numbers that have opted out by sending message like STOP/UNSUBSCRIBE/CANCEL and this will check OptOut field on UI.

    Screenshot from 2024-11-19 09-05-01.png

    When we send a message to opt out numbers, we will get error message as below

    Opt-Out.png

    Please let me know if you need any improvement in Opt Out functionality.

    Take the latest package from store and verify it

    Thank You, Brainvire Team

  12. JosephNewhall member avatar

    JosephN

    one week ago

    After adding some debug logging to the plugin PHP code, doing further debug testing, and inspecting the PHP and CRM logs yesterday, I found a few things that were causing issues.

    1. In your "BVSMS\receiveSMS.php" you are searching each of the 3 module databases, Accounts, Contacts, and Leads for the incoming phone number so that you can use that to create the call log record properly. However Twilio returns the full number with the country code, +1 in our case, but we don't use the country code in our phone numbers, only our in-country area codes so it will never find the correct module and the Call log record will not load properly when you attempt to click on it hence the white screen.

    To test I added the following code to the findNumberInCRM() function in the "BVSMS/functions.php" file to have it strip the country codes from the numbers before searching the modules.

    if (str_start_with($number,'+1')){
      $number = str_replace('+1','',$number);
    }
    

    The result was that it allowed the relations to be found and properly assigned to the call log and the call logs were able properly load when you clicked on them. As this is just an incomplete and temporary workaround, if you decide to address this issue you should consider checking to see if the number has the country code, if it has a country code and fails to locate the number in the module databases, strip out the country code, and query again using the phone number without a country code. You may also want to consider creating a custom module where you can log any incoming SMS number that you can't resolve back to a specific module. If you do this the plugin won't create a broken record in the Calls module that can't be viewed when it can't reconcile a number to a module. You may even want to consider moving ALL logging and viewing of SMS messages into a custom module to unify the user experience.

    1. I noticed the following error in the CRM log after receiving an incoming SMS, [ERROR] Unable to load custom logic file: "custom/brainvire/Logichooks/bv_update_schedule_sms_logic.php", this logic hook is declared in the "custom/Extension/modules/Calls/Ext/LogicHooks/bv_logic.php". After checking the "custom/brainvire/Logichooks/" location for the "bv_update_schedule_sms_logic.php" I found that it didn't exist BUT the file "bv_schedule_sms_logic.php" does exist. After looking at the function and seeing that it will both add and update it seems that it may be possible that you simply renamed the file but hadn't updated the logic hook declaration before release. I tested changing the logic hook declaration to correspond with the current file name and the error went away, and it seems to work but you will have to tell me if the scenario I am assuming is really the case or if I am truly missing the "bv_update_schedule_sms_logic.php" file.

    With the temporary workaround changes I have done, I am now able to receive the incoming webhook requests from Twilio and I can now properly see the incoming calls logged in the Calls module. I will download and install the latest version to test the opt-out features you have implemented. I have created a CRM endpoint that will act as a middleman to temporarily handle the formatting of the incoming SMS numbers and then forward the request to your endpoint, this way I can continue to update your plugin easily and still retain the incoming SMS functionality until they are addressed in your end.

    Also, please let me know if you are considering creating a way to configure global/group/role-based notifications for incoming SMS. Until then I will try to implement that functionality with my middleman CRM endpoint.

    I will let you know how the new update works out,

    Thank you again for all your time and help I really appreciate it.

  13. BrainvireInfotech member avatar

    Brainvire Infotech Pvt. Ltd Provider Affiliate

    one week ago

    Hello Joseph,

    1. As you mentioned, you are not giving country code but we are searching for country code in the incoming message file. Yes its correct as this plugin is general and for all the countries. So we cannot remove +1[country code] from the number & search it. because country code can be one digit or two digit numbers. But due to this call record is breaking when there is no record found, its due to some other issue which we have fixed in our latest package in the store. But to relate the call record to Record with the number matching you will have to continue using the code in receiveSMS.php that you mentioned above. This piece of code we cannot add in our file as it will be US country specific.

    if (str_start_with($number,'+1')){ $number = str_replace('+1','',$number); }

    1. With our plugin, we can schedule SMS using module BV_Schedule_SMS. The logichook you mentioned bv_schedule_sms_logic.php is for that purpose. We have declared in that module. Actually we forgot to remove the old logichook defintion in the Calls module which is not required any more. Sorry for the inconvenience, you can comment out the logic present in the file in path custom/Extension/modules/Calls/Ext/LogicHooks/bv_logic.php. Its not needed any more

    2. global/group/role-based notifications for incoming SMS, I did not get this point. Can you please let me know in detail. As per our new package, if Account A is having a number and assigned to of Account is Joseph and if an incoming messages flows into this number then Joseph will get notification. Is this you require ?

    Please take the latest package from store and explore the new functionalities.

    Thank You, Brainvire Team.

  14. JosephNewhall member avatar

    JosephN

    one week ago

    Thank you for your response,

    1. Excellent I fully understand, thank you for fixing that.
    2. Thank you for this clarification I will do so.
    3. In our situation, we use this for direct, bulk general notification, and bulk marketing SMS campaigns to our customers that have opted in. Regardless of whether the SMS message was a direct message initiated by a salesperson, was a bulk general SMS notification, or was a bulk SMS marketing campaign, we want our ENTIRE sales department to be notified of ANY incoming SMS so it can be handled by whoever is available and doesn't get missed if someone is sick or not in the office. If you don't decide to add this functionality I fully understand and have prepared to work around this while continuing to use your plugin. I began implementing a group alert logic hook yesterday just in case, and I am almost done with it. I have also been requested to make the CRM relay the incoming SMS to our Sales email box so I already had to create the endpoint and logic hook for that function anyway.

    I will install the new build and let you know how things go.

    Thank you for all your help, I appreciate how responsive and helpful you have been.

    Have a great day!

    • BrainvireInfotech member avatar

      Brainvire Infotech Pvt. Ltd Provider Affiliate

      one week ago

      Hello

      Yes we will not be implementing bulk notification as its specific requirement. But please let us know if you are facing any issue in existing requirement. We will surely look into it.

      If you are happy with our plugin functionalities and our support, please provide us feedback in https://store.suitecrm.com/addons/bv-sms-extension/reviews

      It would be great help to us.

      Thank You, Brainvire Team

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...
Rating
  • "everything perfect, precise and fast assistance, the module works exactly as described, also integrated with the custom modules Thanks you are great" - massimo.capuano

    Read More Reviews