This article is an example of how to set up a Workflow for Triggers+ChatGPT that will do the following:
When a new ticket is created, the Order Number is extracted from the Last Customer Comment in the ticket using the Extract From action. The ticket is then updated and this value is added to the ticket in the Custom Field "Order Number".
For general information on setting up Workflows, refer to Configuring the Workflows for the Triggers+ChatGPT App.
In this Article
Creating the Workflow
Name and Trigger
Action that is Made by OpenAI ChatGPT
Zendesk Action
Enable the Workflow and Save
Opening the Trigger that is Created
How the Workflow Updates the Order Number in the Ticket
Creating the Workflow
The following is a summary of how to set up the Workflow for this example.
Name and Trigger
Name | Enter the Name, for example, Extract Order Number |
Trigger |
This selects the Zendesk Trigger to use, and whether this is when the ticket is Created or Updated. You can select When a ticket is created (new Trigger) to create a new Trigger. You can also select an existing Trigger that has already been created for a Triggers+ChatGPT Workflow. For details on this, refer to Trigger in Configuring the Workflows for the Triggers+ChatGPT App. |
Action that is Made by OpenAI ChatGPT
The next fields determine what ChatGPT does. For this example, the following is added to the Workflow.
OpenAI ChatGPT Action | Select the OpenAI ChatGPT Action as Extract Value |
GPT-4 or GPT-3.5 |
In order to properly use, or to test, Triggers+ChatGPT you need to have a paid OpenAI API account. This will allow you to select GPT-4. For further information, refer to Open API Key in Configuring the Workflows for the Triggers+ChatGPT App. |
OpenAI API Key |
The first time you set up a Workflow, you need to enter your OpenAI API Key which allows Triggers+ChatGPT to communicate with the OpenAI services. If you have already saved your key you will not need to enter this again. For details, refer to Open API Key in refer to Configuring the Workflows for the Triggers+ChatGPT App. |
Extract Value From |
In this example, the workflow is being set up to extract the value from the Last Customer Comment. |
What to extract |
Enter a name for what is being extracted. The name has to be descriptive, such as Order Number, but this does not need to match any of the fields. |
Format of the value to extract |
You then need to tell ChatGPT what the value looks like, using plain English. These are the ChatGPT prompts. Describe the format of the value and be as specific as you can. You can have as many rules as you need. Also give an example of the value. For this example, the Format of the value to extract is added as the follows. Text between 10 and 15 characters that starts with BT followed by numeric characters or when the customer specifically refers to a text as being the id or the order. Example: BT82476734 |
The following is how this example looks when setting up the Workflow.
Zendesk Action
Next, configure what the Zendesk Action is when it updates the ticket.
Set Custom Field Value |
Select the Custom Field you want to use. For this example, the value will be added to a Custom Field in the ticket Order Number. If the Custom Field you need does not already exist, you can add it to your Zendesk Support (using a different window) and then click Refresh fields from Zendesk so you can select it. |
Enable the Workflow and Save
Enable the Workflow by clicking the Enable/Disable toggle and save it by clicking Save.
The Configuration displays and includes the saved Workflow.
You can open and edit the Workflow at any time from the Triggers+ChatGPT Configuration. If you want to check or make changes to the Trigger for the Workflow in your Zendesk Admin Center before enabling it, you can leave it as disabled, check the Trigger then open the Workflow and enable it.
Refer to Editing a Workflow in Configuring the Workflows for the Triggers+ChatGPT App.
Opening the Trigger that is Created
The Workflow was configured selecting When a ticket is created (new Trigger). When the Workflow is saved, this automatically creates a Zendesk Trigger in your Zendesk Admin Center. You can open the trigger directly from the Workflow by clicking View Trigger.
Making Changes to the Zendesk Trigger
You can make changes to the Trigger, for example, to change the Conditions so that it is triggered either when a ticket is Created or Updated. In the Trigger you would change the following:
-
Remove the Conditions in the Meet ALL of the following conditions section.
Ticket > Ticket Is Created
-
Add the following Conditions in the Meet ANY of the following conditions section.
Ticket > Ticket Is Created
Ticket > Ticket Is Updated
For an example of this change, refer to Making Changes to the Zendesk Trigger for the Categorize Workflow in Example Workflow - Categorize a Ticket based on the Text in the Customer Comment and Update the Categories as Tags in the Ticket.
If you make any changes, ensure that these are also relevant for any other Workflows that the Trigger is used in.
How the Workflow Updates the Order Number in the Ticket
The following is an example of how this Workflow updates the Order Number in the ticket.
This is an example of the email that is sent by the customer.
The email arrives and creates a ticket.
A few moments after the ticket is created, the Workflow triggers and updates the Order Number Custom Field with the Order Number that was extracted from the Customer Comment.