Update the SMS endpoint implementation for TWW provider

Description

Contact

  • @Bruno Furtado
  • @henrique.cavarsan

Problem

On February 21, 2024, the Clockin team began reporting cases of customers not receiving SMSs. We identified there was a change in the TWW provider's communication protocol. This change impact the platform and we stop to send SMS using this provider.

This is the statement from TWW:

This is the example of request and response (we receive 200 but the mdmSmsResponse param has a message with NOK, indicating a problem).

curl --location --request POST 'https://api.carol.ai/api/v1/sms?fromNumber=%2B5521933007022&toNumber=%2B5541...&text=test' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: TOKEN'

{
    "data": {
        "mdmCreated": "2024-02-22T18:15:20.022Z",
        "mdmCreatedUser": "bruno.furtado@totvslab.com",
        "mdmEntityType": "mdmSmsLog",
        "mdmId": "5726f2a788d84492a687e112090b6fe2",
        "mdmLastUpdated": "2024-02-22T18:15:20.022Z",
        "mdmPhoneNumber": " 5541...",
        "mdmSmsMessage": "test",
        "mdmSmsProvider": "TWW",
        "mdmSmsReason": "API",
        "mdmSmsResponse": "<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><EnviaSMSResponse xmlns=\"https://www.twwwireless.com.br/reluzcap/wsreluzcap\"><EnviaSMSResult>NOK</EnviaSMSResult></EnviaSMSResponse></soap:Body></soap:Envelope>\n",
        "mdmSmsSuccess": true,
        "mdmTenantId": "ad0f39bf99d340cb84bba9d56bba8a9a",
        "mdmUpdatedUser": "bruno.furtado@totvslab.com"
    },
    "success": true
}

It is only impacting this provider (TWILIO is working well).

Solution

It is necessary to update our implementation to follow the new protocol from TWW. And here we have the link with the documentation: https://docs-pt.sinch.com/documentacao-tecnica/todas-as-integracoes/sms-api

More details

Acceptance criteria

  1. Implement new communication protocol with the TWW provider.

Activity

Automation for Jira 27 February 2024, 21:18 Jira Internal Users

This issue was automatically transitioned to WAITING DEPLOY, as its PR was just merged into master branch in Github.

Automation for Jira 27 February 2024, 21:17 Jira Internal Users

Github user douglascoimbra has just approved a PR (added as Shard Assignee in this Jira issue).

fix: update service TWW

Automation for Jira 27 February 2024, 17:05 Jira Internal Users

This issue was automatically transitioned to QA REVIEW, as its PR was just approved in Github.

Automation for Jira 27 February 2024, 16:44 Jira Internal Users

This issue was automatically transitioned to REVIEW, as its PR (not DRAFT and not WIP) was just created in Github.

fix: update service TWW

Douglas Coimbra Lopes 27 February 2024, 14:06 Jira Internal Users

SMS WITHOUT TWW PARAMETER

TWW PARAMETER ON THE TENANT

Automation for Jira 26 February 2024, 22:08 Jira Internal Users

This issue was automatically transitioned to REVIEW, as its PR (not DRAFT and not WIP) was just created in Github.

fix: update service TWW

Automation for Jira 22 February 2024, 21:14 Jira Internal Users

Message thread link on #red-phone channel:

https://totvscarol.slack.com/archives/C03NT4US9J9/p1708632889339509

Automation for Jira 22 February 2024, 21:14 Jira Internal Users

@Robson Thanael Poffo ,

@Geny Isam Hamud Herrera ,
This issue was planned to be delivered until 2024-03-01. You can check that by consulting the issue in the Due Date field.

Dates already planned for this issue: 2024-03-01

If External Issue Link field is filled, customer was also informed on JIRA TOTVS.