The event API "ticket.propertiesUpdated" is not working in live production. But it is working in sandbox (that is virtual setup of live production).

I am trying to capture the values of updated custom fields with the help of the ticket.propertiesUpdated event in app.js. The specified event is not working in live production. But it is working fine in customer’s sandbox environment. It behaves inconsistently when it is moved to customer’s production environment.

Thanks,

Can you please elaborate not working? Are you getting any error and not getting your desired property?
Can you also share your piece of code and use case here so we can further help you :slight_smile:

2 Likes

Little bit of specific details and information on what is not working/consistent could helpful @Priya_Dharshini. Please add any more information like screenshots or code snippets, that you may think could be of help.

1 Like

I am sharing the piece of code used in my code.

const headers = {
“Authorization”: “Basic <%= encode(iparam.fd_apiKey) %>”,
‘Content-Type’: ‘application/json’
};

$(document).ready( function() {
app.initialized()
.then(function(_client) {
window.client = _client;
console.log(“headers”,headers);
console.log(“options”,options);

 client.data.get("ticket").then (
    function(data) {

	  console.log("INSIDE UPDATE"); console.log(data);
     let content = data.ticket;
	 	console.log("content......",content);
		console.log("content.custom_fields.cf_test");console.log(content.custom_fields.cf_test);	 
    },
    function(error) {
  
	  console.log(error);
    }
  );

client.events.on("app.activated", onAppActivated);
 client.events.on("ticket.propertiesUpdated", eventCallback);

},
function(error) {
console.log(“error_____________”);
console.log(error);
});

// client.events.on(“app.activated”, onAppActivated);

function onAppActivated() {  
  console.log("App Activated________");    

}
var eventCallback = function (event) {
var event_data = event.helper.getData();
console.log(“INSIDE…propertiesUpdated”);
console.log(event_data);
event.helper.done();

};

});
Sometimes App is initiated and throws logs too.rar (695.0 KB)

The event API “ticket.propertiesUpdatedc” is working fine in sandbox environment. But in production it is not working. Please refer the below link both sandbox and production to find out the issue.

sandbox environment : Loading...

The domain link which we are facing issue: https://blackbuckcare.freshdesk.com/