Jump to content
  • Zendesk Integration - 3.3 - GSE Action Zendesk Ticket Status

    Zendesk Integration - 3.3 - GSE Action Zendesk Ticket Status

    VBScript   Lua

     

    This GSE action can be used to check the status of a given Zendesk ticket from within the call routing.

     

    An example call routing script can be found in A.1 - Example: Check Status or a more advanced example in A.2 - Example: Check Status and Update Ticket.

     

    image.png

     

     

    Configure action parameters

     

    image.png

     

    By double clicking on every parameter in the list, you can edit it.

     

    TicketID

    The Zendesk ID of the ticket to check the status from. The ID can be given with or without the Zendesk typical # prefix, i.e. 1234 or #1234.

     

    TicketIDMinLength  1.3.0

    The minimum length of a valid Zendesk Ticket ID. The default value is 4.
    This prevents the Zendesk API to return huge result lists.

     

    Zendesk Login User

    Login user. To connect to Zendesk a Zendesk user login is required. This project uses a username/token authentication instead of username/password. This is a more robust solution, and keeps the call routing script independent from any password changes the Zendesk user might do. Please follow this link to learn how to obtain the needed login token. 

     

    Zendesk Login Token

    Login token. To connect to Zendesk a Zendesk user login is required. This project uses a username/token authentication instead of username/password. This is a more robust solution, and keeps the call routing script independent from any password changes the Zendesk user might do. Please follow this link to learn how to obtain the needed login token. 

     

    Zendesk Domain

    Your Zendesk domain URL. This is something like "yourcompanyname.zendesk.com".

     

     

     

    Configure action exits

     

    image.png

     

    Exit 0 (Default)

    This exit will be reached if an invalid issue id was given or any kind of problem occured. It is recommmended to name this exit "invalid".

    If you reach this exit you can refer to 3.6 - Trouble Shooting to figure what went wrong.
     

    Exit 9

    This exit will be reached if an unknown status was returned by the Zendesk REST API. It is recommended to name this exit "unkown".

    If you reach this exit you can refer to 3.6 - Trouble Shooting to figure the returned status and modify your status mapping.

     

     

    Dynamic Status Mapping 1.5.0

     

    This GSE action provides a flexible mapping of Zendesk ticket status values to exits of the block. All block exits 1 to 8 are of your free chosing. 

     

    By default this GSE action maps the status values to exits as follows. If nothing changes on the Zendesk side, you don't need to do any modifications. If however Zendesk makes changes to their status values or you want another mapping of status values to the exit, you can freely do so. This is the defalut mapping:

     

    Exit    States
    1 new
    2 open
    3 pending
    4 hold
    5 solved
    6 closed

     

    As already mentioned, you can modify this mapping to your precise needs. Just keep in mind that only the exits 1 to 8 are available to you.

     

    All you need to do is to modify a global variable before you use the Check Status GSE action. This can best be done in a Insert Script Code block.

     

    image.png

     

    The content of the Insert Script Code block is then the definition of the mapping list, which is either a VBScript Array or a Lua Table. In both cases you are free to map any number of states to any exit (1..8).

     

    Lets assume you want to map new states newstate_a to exit 7 and newstate_b to exit 8. This is the code you need to place into the Insert Script Code block:

     

    For VBScript based call routing:

    UseExit = 0
    
    g_aZendeskTicketStatusMapping = Array( _
        "1;new", _
        "2;open", _
        "3;pending", _
        "4;hold", _
        "5;solved", _
        "6;closed", _
        "7;newstate_a", _
        "8;newstate_b")  

     

    For Lua based call routing:

    UseExit = 0
    
    g_aZendeskTicketStatusMapping = {
        "1;new",
        "2;open",
        "3;pending",
        "4;hold",
        "5;solved",
        "6;closed",
        "6;newstate_a",
        "6;newstate_b"
    }

     

    As you can see, you are absolutely free in terms of the mapping of the different possible states of your service issue to an exit of the Run GSE Action block.

     

    All you need to do is to do your mapping in the Insert Script Code block and afterwards open and name the exits of the Run GSE Action block accordingly.

     

    An example of some own status mapping can be found in A.6 - Example: Check and Announce Status.

     

     

     

    Additional return values (as global variables)

     

     

    g_sLatestZendeskTicketID (string)

    This global variable holds the ID of the latest checked ticket after the ok (0) exit has been reached.


    g_sLatestZendeskTicketStatus (string)  1.5.0

    This global variable holds the status of the latest checked ticket after the ok (0) exit has been reached.
    The A.6 - Example: Check and Announce Status makes use of this variable to announce the status via AzureTTS (text-to-speech).

     

    g_sLatestZendeskTicketModified (string)  1.5.0

    This global variable holds the latest modification date of the latest checked ticket after the ok (0) exit has been reached.

    The date is as the Zendesk API provides it (in UTC time), e.g. "2024-09-06T15:52:48Z".

     

    g_sLatestZendeskTicketModifiedReadable (string)  1.5.0

    This global variable holds the latest modification date of the latest checked ticket after the ok (0) exit has been reached.
    The date is in a better readable in most importantly in local time, e.g. "06.09.2024 17:52:48".

    The A.6 - Example: Check and Announce Status makes use of this variable to announce the latest modification date via AzureTTS (text-to-speech).

     

     




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.