Solved

How to retrieve an inbox email using the plugin SDK ?

  • 9 June 2023
  • 1 reply
  • 36 views

Badge

My front plugin displays a select box with all the recipients of the currently selected conversation, and I would like to remove from this recipients list the one that are inboxes of the company.

 

However, when I retrieve the inboxes of the company, I only get their names, and not their emails so I cannot exclude the inboxes from the select box. Is there any way to retrieve an inbox email when working in a plugin ?

icon

Best answer by jason 13 June 2023, 21:23

View original

1 reply

Userlevel 4
Badge +7

Hi Uelb,

It’s important to understand the distinction between a channel and an inbox here. We have a full guide available here → https://help.front.com/t/k929nz/explaining-front-inboxes-empty-inboxes-and-channels, but the TL;DR is:

  • The inbox is where a conversation is located (not much more than a folder).
  • The channel is the mechanism by which messages arrive in, and are sent from Front (like emails, SMS numbers, etc). Messages received via a specific channel will always be routed to a specific inbox, but multiple channels might route to one inbox, and rules may relocate the conversations to other inboxes.

You’ll want to utilize the listChannels() SDK method; this will list the Channel objects in your account (including their addresses, such as email addresses). From this channel list, you can compare the channel addresses with the message recipients and remove any recipients you need to. 

Let me know if you have questions!

Reply