Hi Team,
We have a requirement to add an email id to the ticket reply’s “To field” in the ticket details page.
In this case, I tried the Interface API’s setValue method.
https://developers.freshdesk.com/v2/docs/interface-api/#ticket_details_page
Unfortunately, the email is not added and no error response from the event. I have attached the screen-recording below for reference.
HTML Code
<fw-button id="addEmail">Add Email to "To Field"</fw-button>
Javascript code
$(document).ready(function () {
app.initialized().then(function (_client) {
window.client = _client;
client.events.on('app.activated', function () {
$('#addEmail').click(function () {
console.log('clicked');
client.interface.trigger('setValue', { id: 'to', value: ['tom@customer.com'] }).then(function (d) {
console.log('interface response', d);
}).catch(function (err) {
console.error('interface error response', err);
});
});
});
});
});
Can you please guide me with this?
Thank you,
Siva