Cannot find which submit click triggered the event in Freshservice

Hi Everyone,

We are developing a Freshservice app, where we need to do some functions when a user adds or update notes or reply to a ticket.

We are trying to use the event ticket.submitClick, but we are unable to find which submit click triggered this event.

Event payload received,

bubbles: true
cancelBubble: false
cancelable: true
composed: false
currentTarget: null
data: undefined
defaultPrevented: false
eventPhase: 0
helper: {getData: ƒ, fail: ƒ, getFailMessage: ƒ, done: ƒ}
isTrusted: false
path: (2) [document, Window]
returnValue: true
srcElement: document
target: document
timeStamp: 10747.82000000414
type: "ticket.submitClick"
__proto__: Event

We couldn’t find a way to listen for notes update.

Please help us find a solution.

Thanks,
Arshath

Hello @arshath.h Arshath,

I’m not sure if it would help but there is a product event dedicated to this for serverless applications called onConversationCreate. Maybe that will work for your use case.

1 Like

Hi @Zach,

Yup, this works. But for my use-case, I need to show modal to get some data from the agent after these events.

2 Likes

@arshath.h There’s no data available in the payload or event helper method to define which type of note has been submitted in the ticket.submitClick event. Notice that it’s a click event and not a intercept event. So, the action cannot be prevented whatever happens in the event handler method.

I could not think of any other reliable solution apart from the one that @Zach has suggested. Thanks Zack for that. :slight_smile:

I will pass it as a feedback to Freshservice product team to add the type of note in the payload or helper data.
Also, to expose an intercept event for the same click event.

2 Likes

Hi @Raviraj,

Thanks for your update.

1 Like