Set from email address is not working

Hello Team,

I created a custom app that, when the user clicks the reply or forward buttons, sets a verified email as the from address.

This app is not working as expected when the user clicks once on the reply or forward buttons inside the note.

But when the user clicks more than once, it is working.

Below is the code i:

client.events.on("ticket.replyClick", clickEventCallback);
function clickEventCallback() {
    client.interface.trigger("setValue", { id: "forward", field: "from", value: email });
    client.interface.trigger("setValue", { id: "reply", field: "from", value: email });
}

Please refer to the below video to understand the issue better.
https://share.vidyard.com/watch/iW32q8ob3d2qzLNjk7kqVE?

Hi @Akhil_Moningii,
Good Day! Sorry for the delay in responding
Can you please share with us the app which you are trying, We will try to reproduce and let you know the root cause?

Thanks

Hi Santhosh,

Kindly find the app zip :point_down:

Thanks
replyForwardTest.zip (4.6 KB)

1 Like

I had gone through the code,

you need to rewrite the code little

for both methods you are using the same callback

eg: client.events.on(“ticket.replyClick”, clickEventCallback); client.events.on(“ticket.forwardClick”, clickEventCallback);

and you’re enabling for both reply and forward

client.interface.trigger("enableElement", { id: "reply", field: "from" }) .then(function (data) { console.log("enableElement reply - ", data); }).catch(function (error) { console.log("error in enableElement reply - ", error); }) client.interface.trigger("enableElement", { id: "forward", field: "from" }) .then(function (data) { console.log("enableElement forward - ", data); }).catch(function (error) { console.log("error in enableElement forward- ", error); })

which is wrong

same here:

client.interface.trigger("setValue", { id: "forward", field: "from", value: "customersupport@fwsc.freshservice.com" }) .then(function (data) { console.log("setValue forward - ", data); }).catch(function (error) { console.log("error in setValue forward - ", error); }) client.interface.trigger("setValue", { id: "reply", field: "from", value: "customersupport@fwsc.freshservice.com" }) .then(function (data) { console.log("setValue reply - ", data); }).catch(function (error) { console.log("error in setValue reply- ", error); })

so I would suggest segregating the code for each operation

Thanks

@Santhosh We had reached out to the product team for this issue. Here is the response from the team. It sounds like the conversation editor button (reply, forward) doesn’t support this feature as the conversation action editor loads only when the user makes any action on the screen.

> We don’t support reply event or forward event callbacks for the conversation buttons as per the dev portal documentation. The app will work fine for the reply, forward buttons at the bottom of the page or the top navigation bar.

1 Like