Requesting again for your insights/tips for the workflow that I have made recently
here's the code: I'm still new to deluge and Zoho API so I need some help here.
Since our team has multiple department and what I'm trying to achieve here is the search function only search ticket information on a specific dept only and if user input a ticket number outside//non-existing of that department it will prompt an alert message - "Ticket not Found" then will clear the values of the input fields.
searchValue = {"ticketNumber":input.Ticket_Number.toLong()};
TicketRecord = zoho.desk.searchRecords(680xxxx,"Tickets",searchValue,0,5,"deskconnect");
for each Ticket in TicketRecord.get("data")
{
if(Ticket.get("departmentId") == "35108xxxxxxxxx")
{
if(true)
{
X.....
X....
X......
input.Site_POC = Ticket.get("contact").get("firstName") + " " + Ticket.get("contact").get("lastName");
input.Phone_Number = Ticket.get("contact").get("mobile");
}
else
{
x....
x......
input.Site_Location = ""; //not working
input.Site_POC = ""; //not working
input.Phone_Number = ""; //not working
info "Ticket not Found" //I guess I misunderstood here the function of INFO
}
}
}