Need an app to auto select Reply-to email address on creation of ticket

5 Comments

  • Bryan - Community Manager
    Comment actions Permalink

    Have you checked out this free marketplace app Raman? Select an Address

    It may not have the automatic features you're looking for regarding agent group, but maybe could fill a gap.

    0
  • Raman Kalia
    Comment actions Permalink

    Hi Bryan,

    Thanks for replying! I already have this app from Zendesk. It only allows manual selection. I needed to auto-select email based on the ticket group. I'm exploring if someone tried it by developing a private app.

    Thanks,

    Raman

    0
  • Bryan - Community Manager
    Comment actions Permalink

    Triggers would have been nice, but don't support setting the recipient address. You can, however, set up a 'ticket.save' hook in a ticket sidebar app and do your logic there. Something like this:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    </head>
    <body>
    <h2>Test Setting Recipient Address</h2>
    <script src="https://static.zdassets.com/zendesk_app_framework_sdk/2.0/zaf_sdk.min.js"></script>
    <script>
    let client = ZAFClient.init()
    client.invoke('resize', { width: '100%', height: '200px' })

    // Set up ticket.save event. https://developer.zendesk.com/apps/docs/support-api/ticket_sidebar#ticket-save-hook-events
    client.on('ticket.save', () => {

    // Get agent's Group IDs
    return client.get('currentUser.groups').then(results => {

    // Search groups
    let groups = results["currentUser.groups"].filter((groupObj) => {
    return groupObj.id=='37965807'
    })

    // Depending on search results, set recipient address
    if (groups.length > 0) {
    return client.set('ticket.recipient', 'sales@your_subdomain.zendesk.com').then(results => {
    console.log("Group found. Proceed with save")
    return true
    })
    } else {
    // Still proceed with save.
    return true
    }
    })

    })
    </script>
    </body>
    </html>

    Hope this help! If anyone has other examples or suggestions, please share!

     

    Disclaimer: This is example code and isn't supported by Zendesk.

    0
  • Raman Kalia
    Comment actions Permalink

    Thanks Bryan for taking time out to share this code!!

    One query around this solution, would the sidebar app not require manual firing of its function.

    0
  • Bryan - Community Manager
    Comment actions Permalink

    The function provided to client.on('ticket.save'... is automatically fired whenever the ticket's Submit button is selected. IOW, this approach does rely on an agent reviewing the ticket and selecting Submit.

    1

Please sign in to leave a comment.

Powered by Zendesk