Customizing the "From" address dropdown in Freshdesk

Hi,

I wanted to ask a question related to the Interface API functionality, specifically the “From” address field in the reply editor. There’s a “Customize From Address” app on Freshdesk’s marketplace that allows to associate certain email addresses with certain ticket properties (e.g. groups), and when you try replying to a ticket, the “From” address dropdown shows only the addresses that were set in the app settings, hiding the rest. However, I can’t find anything that would allow my app to do the same in the SDK docs - the closest thing is a method for setting a specific value to the “From” field, but not configuring the dropdown options. Is this an internal feature, or am I just missing something?

2 Likes

@VladislavNechepaev

I guess the app is using Freshdesk product API - Email Mailboxes to populate the dropdown.

@Saif
Yes, I figured as much, but the question isn’t about getting the data for the dropdown, but rather about setting the dropdown options in the interface. We can set the value of the dropdown, but we can’t change the list of possible dropdown options (at least judging by the documentation). I tried using the “setOptions” method, but to no avail.

Did you try using setValue and passing a Array of emails in value property ?

Something similar to

client.interface.trigger("setValue", { id: "cf_agent_number", value:"121333"});

Just tried passing an array of emails to the “From” field using the “setValue” method - nothing happened. The emails are present as mailboxes in Freshdesk.

Nevermind - just found the solution. In order to set the dropdown values for the “From” dropdown, you need to use the “SetValue” method, use “activeEmailConfig” as a field ID, and pass an array of email mailbox IDs (as strings) as the “value” parameter. Example:

client.interface.trigger("setValue", {id: "activeEmailConfig", value: ["5000047958", "5000093390"]})

This field ID doesn’t seem to be listed in the Interface API docs for the “Ticket Details” page - I found it in docs for the Data API under the “email_config” method. Would be great to see it listed in the Interface API to avoid further confusion.

1 Like

Thanks @VladislavNechepaev . I will have this routed to concerned team to make docs better.

1 Like