Having App Automatically "Submit" Ticket | The place for Zendesk users to come together and share
Skip to main content
Solved

Having App Automatically "Submit" Ticket

  • September 24, 2025
  • 2 replies
  • 1 view

Hello,

 

I'm attempting to create a timer app that will automatically add a tag to the ticket after a certain number of minutes.

 

What works so far:

  • Timer is able to be applied with click of a button
  • Timer counts down correctly
  • Timer continues even when ticket is adjusted or closed by user
  • A Tag is applied after timer is done

The issue:

  • When the timer is done, the tag is just placed and requires a user to “Submit” the ticket
  • After the app was updated to automatically “Submit” tickets it began throwing the error: Failed to submit ticket: {"name":"Error"}
  • The app builder replied with:
    • Now I can see the issue. The documentation doesn't show a ticket.submit action. Let me check if there's a different way to submit tickets or if we need to use a different approach.
    • Looking at the documentation, I notice there are ticket submission events (ticket.submit.start, ticket.submit.done, etc.) but no explicit ticket.submit action. The error suggests that zafClient.invoke('ticket.submit') is not a valid action.
    • Let me fix this by removing the automatic ticket submission functionality and instead provide clear messaging about what the test timer does:

Was wondering if anyone had more experience with getting an app to automatically update tickets. Seems like it either can't or I'm just not prompting it correctly?

Best answer by Michael87

Hi Harrison, 

I have a few notes on your app.

First, let's talk about saving the ticket.  In order to save a ticket from an App, you can prompt the app to “save the ticket via the REST API, including the new tag.”  The agent will get a standard notification that the app has been updated.

When I used this feature, it was to change the layout using a tag-based Contextual Workspace, so I prompted the app to send a ZAF notification including the HTML link to the ticket to force a refresh.  That may not be your need, but you could add that to your prompt if needed.

I'd start with a prompt like this and then iterate:

We are making a countdown app.  Make an app with a ‘timer’ button.  The button will add the tag `pending_tagging` to the ticket and save the ticket (using the REST API) and any changes to it,including that tag.  Start and dispay a countdown timer for 60 minutes.  When the timer reaches zero, add the tag `my_action_tag` and remove the `pending_tagging` tags and save the ticket via API.  When the app opens, if the ticket has a `pending_tagging` tag, do not show the button, but get the ticket audit history via the API and see when the tag was added.  calculate the remaining time in the 60 minute period and restart the counter from there.

That's rough, and still requires a solution for bullet item #3.  See below for advice on that.
 

Second, the requirement to set a tag after a delay.  Apps built with App Builder run strictly in the context of an agent's Agent Workspace session and if you close a ticket, they stop running.

There are multiple solutions I would consider, depending on how granular you need your workflow to be.

  1. Automations can fire once per hour on tickets and implement rules. 
    You'd use an automation like "If ticket created time > 1 hour and ticket status is not solved and ticket tags include `pending_tagging`", then add the tag `my_action_tag` and remove the tag `pending_tagging`.  You'd want to immediately set the first tag and set the second by automation. 
  2. Zendesk has a new feature in Early Access called Action Builder.  It does not fully meet this need, but can be triggered to act after Agent Workspace is complete.  It is designed for fully automated workflows while App Builder is designed for Agent-involved workflows.  Future versions may provide additional steps to meet your needs.
  3. If Zendesk Automation is not granular enough for your need, there are third party marketplace apps that have their own backends with minute-scale timers.  Zendesk partner Sweethawk.com, provides an app called Timers that may be a good fit, and there may be additional marketplace apps that meet similar needs. 
  4. Third party automation tools could also create similar workflows, which would be a matter of determining which one has the features you need to resolve this issue.
     

2 replies

Hanna15
  • September 25, 2025

Honestly I’d recommend downloading the index file, running it through Gemini or ChatGPT and asking one of them to identify the issue and suggest a prompt. That’s how I figured out getting the app to submit internal notes etc 


Michael87
  • Employee
  • Answer
  • October 14, 2025

Hi Harrison, 

I have a few notes on your app.

First, let's talk about saving the ticket.  In order to save a ticket from an App, you can prompt the app to “save the ticket via the REST API, including the new tag.”  The agent will get a standard notification that the app has been updated.

When I used this feature, it was to change the layout using a tag-based Contextual Workspace, so I prompted the app to send a ZAF notification including the HTML link to the ticket to force a refresh.  That may not be your need, but you could add that to your prompt if needed.

I'd start with a prompt like this and then iterate:

We are making a countdown app.  Make an app with a ‘timer’ button.  The button will add the tag `pending_tagging` to the ticket and save the ticket (using the REST API) and any changes to it,including that tag.  Start and dispay a countdown timer for 60 minutes.  When the timer reaches zero, add the tag `my_action_tag` and remove the `pending_tagging` tags and save the ticket via API.  When the app opens, if the ticket has a `pending_tagging` tag, do not show the button, but get the ticket audit history via the API and see when the tag was added.  calculate the remaining time in the 60 minute period and restart the counter from there.

That's rough, and still requires a solution for bullet item #3.  See below for advice on that.
 

Second, the requirement to set a tag after a delay.  Apps built with App Builder run strictly in the context of an agent's Agent Workspace session and if you close a ticket, they stop running.

There are multiple solutions I would consider, depending on how granular you need your workflow to be.

  1. Automations can fire once per hour on tickets and implement rules. 
    You'd use an automation like "If ticket created time > 1 hour and ticket status is not solved and ticket tags include `pending_tagging`", then add the tag `my_action_tag` and remove the tag `pending_tagging`.  You'd want to immediately set the first tag and set the second by automation. 
  2. Zendesk has a new feature in Early Access called Action Builder.  It does not fully meet this need, but can be triggered to act after Agent Workspace is complete.  It is designed for fully automated workflows while App Builder is designed for Agent-involved workflows.  Future versions may provide additional steps to meet your needs.
  3. If Zendesk Automation is not granular enough for your need, there are third party marketplace apps that have their own backends with minute-scale timers.  Zendesk partner Sweethawk.com, provides an app called Timers that may be a good fit, and there may be additional marketplace apps that meet similar needs. 
  4. Third party automation tools could also create similar workflows, which would be a matter of determining which one has the features you need to resolve this issue.