question

Asfand Sajjad avatar image
Asfand Sajjad asked Phong Vu commented

Message-store get message list skipping latest message

We are querying message-store get message list using the vendor create date (returned while sending sms).
e.g.
if we have 3 messages in the message-store with vendor create dates as 2020-11-26T12:52:02.000Z, 2020-11-26T09:49:04.000Z, 2020-11-26T09:49:02.000Z
and we use the "2020-11-26T09:49:02.000Z" as dateFrom and "2020-11-26T12:52:02.000Z" as dateTo.

The message with "2020-11-26T12:52:02.000Z" gets skipped.

Is there any delta involved? Am I missing some information?

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 Phong Vu edited

Time zone. Times logged in the message store are UTC-00. When you specify the dateFrom and dateTo, make sure you convert the local time to UTC time accordingly.

1 |3000

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

Asfand Sajjad avatar image
Asfand Sajjad answered Phong Vu commented

@Phong Vu Thank you for reaching out.
We are already using datetime returned by sendSMS endpoint i.e. vendorCreateDate from message-store and its in UTC time zone.

To be more elaborate about the usecase,
lets take this message into account. Assume this specific message is the latest one and we use the creationTime as dateTo (its already in UTC).
1606463086624.png
now this message should be returned in the get message list response but it's not what's happening.

if I add a millisecond in this time, and then query the message-store. This message is returned in the response.

Simple putting: Get Message list isn't returning the message having creationTime exactly equal to dateTo in request.


1606463086624.png (18.7 KiB)
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 have not tested this but if it is the case, then maybe the dateTo is not "<=". The easiest way to deal with is to convert to timestamp and add a few millisecond to the timestamp then convert back to date&time string to read. Can you do that quick test and let me know if that helps.

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