question

James Peragine avatar image
James Peragine asked Phong Vu commented

SMS conversation being deleted

We are sending a new SMS message through the API and then using the ID that is returned for that message to delete that sms message.

using

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/77777777?purge=false

and then

https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/message-store/77777777?purge=true

to try to immediately purge the delete.


5 -15 minutes afterwards all messages including all of the responses to that message disappear from all devices and from the RingCentral APP.

It is my understanding that this delete call is supposed to only delete that one message. It seems to be deleting EVERY message afterwards as well.

Why is this happening??


rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

Did you try without the purge flag? Was it the same result? Also after purging the delete, did you read the message store to see if you can still find the message? The client apps may not re sync after that.

Please check and let me know.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

James Peragine avatar image
James Peragine answered

Funny I woke up and thought about not including the purge flag but have not yet tried it.

I will also check the message store. My intention is only to delete the first outgoing message that I sent so that I will only see incoming responses in my app.


I wouldn't have to do any of this if there was a way to filter to show only incoming messages in the Appliction is that something that we can pay to have implemented?


1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

James Peragine avatar image
James Peragine answered James Peragine commented

I just ran this without the purge flag and it is still doing the same thing.

To be clear it's deleting ALL of the agents texts even older ones. It's crippling our company because we don't know what we lost now.

3 comments
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·

I will have a look into the problem soon. Can you give me your app client id?

This is just a quick note for you that it's safer to test your app on the sandbox environment to make sure things works as expected before trying it on the production. That is the purpose of a sandbox account and you would not mess up with the production data while developing your app.

0 Likes 0 ·
James Peragine avatar image James Peragine Phong Vu ♦♦ commented ·

Yes for sure. It worked perfectly in Sandbox.

Is there a way that I can pay to have the application filter by incoming or outgoing sms messages? That would be the easiest way to get this working.

0 Likes 0 ·
James Peragine avatar image James Peragine James Peragine commented ·

Client ID

TV9Y3hvLTiqi3kA_ccv02Q

0 Likes 0 ·
James Peragine avatar image
James Peragine answered

Hi Phong were you able to figure anything out on this?

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

I just check and here is what I found.

1. Delete a message using the messageId with purge=true will purge your message. Only that particular message will be deleted (removed from your app messaging), not the entire conversation. After that, listing the message store will not show the purged message. But if you call the message-store/[messageId], you can get the following response

{ uri:
   'https://platform.ringcentral.com/restapi/v1.0/account/80964xxxx/extension/5958xxxx/message-store/113275815xxxx',
  id: 113275815xxxx,
  availability: 'Purged',
  lastModifiedTime: '2020-06-05T20:27:48.469Z' }

2. Delete a message using the messageId with purse=false (default value) will delete your message. Only that particular message will be deleted (removed from your app messaging), not the entire conversation. After that, listing the message store will not show the purged message. But if you call the message-store/[messageId], you can get the following response

{ uri:
 ...
  id: 113276732xxxx,
  to:
   [ { phoneNumber: '+165xxxxxx',
       ... } ],
  from:
   { phoneNumber: '+1209xxxxxxx',
     ... },
  type: 'SMS',
  creationTime: '2020-06-05T20:35:22.000Z',
  readStatus: 'Read',
  priority: 'Normal',
  attachments:
   [ { id: 113276732xxxx,
       ... } ],
  direction: 'Outbound',
  availability: 'Deleted',
  subject: 'First message from Node JS - See in conversation?',
  messageStatus: 'Delivered',
  smsDeliveryTime: '2020-06-05T20:36:01.000Z',
  smsSendingAttemptsCount: 1,
  conversationId: 6288356833283647000,
  conversation:
   { id: '6288356833283647895',
     ... },
  lastModifiedTime: '2020-06-05T20:36:01.651Z' }

3. Once you delete a message, you cannot call delete it again with purge=true to purge it

4. Once you purge a message (purge=true), you cannot delete it again

If you still have those message Ids, can you call GET message-store/[messageId] to see what is the "availability"?

I am not aware of a way to restore deleted or purged messages. But you can try to send a request to customer support to see if they have a tool to do so.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

James Peragine avatar image
James Peragine answered

Thank you for taking a look at this Phong. I will try this shortly . I am not worried about the messages that were already deleted. I only care about getting this process working moving forward.


Will report back soon with findings.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

James Peragine avatar image
James Peragine answered Phong Vu commented

Phong you mentioned earlier that after a message is deleted any further responses from that recipient will no longer sync. Could that be what is happening here?


This is happening from the context of my users and what they are seeing when they are using the Ring Central at app.ringcentral.com (the new online application). This is where the SMS messages are disappearing from.

1) Does deleting the first message cause any subsequent sms messages from that recipient to stop syncing as well in the online application(app.ringcentral.com)?

2) Is it possible to pay for customization to have the ability to filter SMS messages by INCOMING or OUTGOING in the online application (app.ringcentral.com)

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·

I believe that the app also reads messages from the message store database. Delete a single message from a conversation will not delete other messages in that conversation. You can test this easily using the API or using the RC phone app.

1) No, deleting the first message or any message won't delete the entire conversation

2) No, there is no add on feature to filter messages by direction. They are automatically grouped in conversations

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys