Coming soon: Your brand new Help Center & Community! Get a sneak-peek here

Notify sendNewTicketMessage does not generate notification?

Hi,

So per standard a new message from the customer centre generates a notification for the user.

I would like to do the same when i create a message from crmscript. From the documentation i found this;

But no notification is not generated for my user.

So i started testing out the other funtions and the only one that seem to be generating a notification is using

directly to the user. But i would really like to use the sendNewTicketMessage since is has a href to the ticket.

Am i missing something or are the functions broken?

/Andreas

RE: Notify sendNewTicketMessage does not generate notification?

Hi,

Could you explain abit more exactly what you are doing before calling notify function?

Von: Michel Krohn-Dale 21. Apr 2020

RE: Notify sendNewTicketMessage does not generate notification?

Hi!

Ah yes, so i'm creating a new message on the ticket with the folowing code;

As you can see i also use the m.save and specifying "noNewInfo" = false, which sets the Read status to "new information".

I still dont get a notification.

As i wrote before, i do get an notification when replying to the ticket in the customer centre with standard funtionality.

Von: Andreas Bergstrand 27. Apr 2020

RE: Notify sendNewTicketMessage does not generate notification?

Hi Andreas,

Yes, the notification system is separate and not included in the "add message" api. You will have to call notify yourself to create notification. You can see how this is done if you look at the CRMScript for the OK-button in the "New request" screen. From the top of my head, something like this:

Notify notify;
notify.sendNewTicketMessage(ticketId, false);

Sverre

Von: Sverre Hjelm 27. Apr 2020

RE: Notify sendNewTicketMessage does not generate notification?

Hi Sverre!

Ok so i looked into the OK button for Edit ticket and found this,

I added som logging to know exactly which method was runned and found that when i create a new message with another user.

the no hotlist was executed. And correctly i got an notification

So what exactly is the difference of running this code in the edit ticket screen and in a seperate crmscript?

Why am i not  able to create such notification? Is there some hidden code executed afterwards in screens/customer portal that is not included in the crmscript excution? 

Would really like to know what needs to be done to able to use these functions :) Im not able to diffrentiate anything in the ticketlog that might do the trick... that is from creating a message in a screen/crmscript/customer portal.

So this is the current script im trying to run;

//Andreas

Von: Andreas Bergstrand 29. Apr 2020

RE: Notify sendNewTicketMessage does not generate notification?

Hi,

Are you sure its not a matter of context? Meaning if you own ticket, and add message to this ticket, I would not expect any notification as I am performing action. But if other user is adding message to my ticket, it should notify.

Von: Michel Krohn-Dale 29. Apr 2020

RE: Notify sendNewTicketMessage does not generate notification?

Hi!

Sigh... when you try different combinations but miss you on the one that actually does the job. It does work now. :) so we can close this thread. Just run the code posted previously in a rest call and it will work!

Von: Andreas Bergstrand 4. Mai 2020