question

sharmilan-a11462 avatar image
sharmilan-a11462 asked ·

Optimise contact list requests in the RC widget

When routing to /contacts list page in the RC widget, getContact event will trigger. This flow will be get seems a bit not optimized, that need to get all the contacts again and again.
So better solution only get updated contact list when routing to /contacts and update the existing contacts.
Can you trigger any other event for getting contacts, since getContacts will trigger at the start.
Or is any way to get back the contacts then I can merge the updated contacts.
topic-default
1 |1000 characters needed characters left characters exceeded

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

Embbnux Ji avatar image
Embbnux Ji answered ·
Hi, Sharmilan. Thanks so much for feedback. Yes, you are right. The widget should only request updated contacts when user go to contacts page. I have create a issue to follow this. It will be updated in about a week. Will keep you updated.   https://github.com/ringcentral/ringcentral-embeddable/issues/169
Share
1 |1000 characters needed characters left characters exceeded

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

sharmilan-a11462 avatar image
sharmilan-a11462 answered ·
Thank you Embbnux Ji, Can you make it as much as possible please?
13 comments Share
1 |1000 characters needed characters left characters exceeded

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

You are welcome. Sure, I will work on it as soon as possible.
0 Likes 0 · ·
Hi, Sharmilan

We have added this feature to master branch release. Please follow this document to update your codes. You need to add 'syncTimestamp' in your contacts response. And in next request, widget will send you syncTimestamp back, and you just need to return updated contacts after sync timestamp. 

Looking forward to your feedback.
Thanks
0 Likes 0 · ·
Thanks a lot, I ll check
0 Likes 0 · ·
Hi Embbnux Ji,
This is working fine for the smaller amount of data. But if like 50 requests for CRM with little bit big response (Not huge like image data) the 'syncTimestamp' not existing in the request.body
Why is that?
Before this fix I have added some workaround for this kind of issues.
0 Likes 0 · ·
Hi, Sharmilan, I am not very clear about your '50 requests for CRM with little bit big response (Not huge like image data)'. Do you mean widget will send 50 requests in first full sync? In first full sync for large data, widget will send request with page number without 'syncTimestamp', you need to return paging data. And when user goto contacts page, widget will send request with 'syncTimestamp'. You only need to return updated data since last sync timestamp.
0 Likes 0 · ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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