This article details how to set up the Workflows for the Ticket Parser Autofill app.
In this Article
Adding a New Workflow
Workflow Name
Trigger
Creating the Rules for Parse and Extract
Selecting Where to Extract the Value from
Selecting How to Extract the Value
Use a Pattern to match the value
Writing your Own Regular Expression
Using AI to Extract the Value
Submitting and Editing the Parsing Rules
Adding Additional Parsed Value Rules
Choosing how to Update the Ticket with the Extracted Value
Add Tag to Ticket
Add Comment to Ticket
Set Custom Field Value
Change Requester
Enabling and Saving the Workflow
Adding a New Workflow
To add a new Workflow, click New workflow on the Configuration page.
The screen displays for you to enter the Workflow details.
Workflow Name
Enter a Name for the Workflow. The Name shows on the Configuration page.
If you create a new Zendesk Trigger from the Workflow, the Workflow Name is also added to the name of the Trigger that is created. Refer below to Trigger and to Opening and Editing the Swifteq Trigger Created in your Zendesk Admin Center.
Trigger
Ticket Parser Autofill integrates with Zendesk Triggers.
You can create new Triggers from the Ticket Parser Autofill app by selecting one of the following:
-
When a ticket is created (new trigger)
The Workflow triggers when a new ticket is created.
-
When a ticket is updated (new trigger)
The Workflow triggers when the ticket is updated when a customer sends a reply.
If the Workflow is set to trigger when a ticket is updated, and it is set up to extract a value from the Ticket Subject, if the agent changes the subject and also sends a reply, this will also trigger the Workflow.
The first time you add a Workflow and select a Trigger, it shows as (new trigger). The new Zendesk trigger will be created automatically when you save the Workflow.
When you have created a new trigger, and when creating other Workflows, any Triggers created from Ticket Parser Autofill also show for selection in the Trigger field. These show as Swifteq New Ticket, or Swifteq Updated Ticket followed by the name of the Workflow in which the Trigger was created.
When setting up the Workflows, you can only select to add a new Trigger, or select a Trigger that has been created through the Ticket Parser Autofill app.
As you set up additional Workflows, you can select to create new Triggers.
Or
You can select an existing Swifteq Trigger, which can be more efficient. Selecting an existing Trigger created through the Ticket Parser Autofill app allows different actions to be executed on the same ticket event. For example, when a ticket is created, if you want to extract the Order Number from the Ticket Subject and/or First Customer Message and add this to a Custom Field, and also extract the Order Address from the First Customer Message, you can use the same Trigger for both actions but in different Workflows.
When a Trigger has been created through the Ticket Parser Autofill app, you can make changes to it from your Zendesk Admin Center. You can change the conditions or filters in the Trigger, for example, you can apply Conditions such as for a "Group" or a "Brand". Refer to Opening and Editing the Swifteq Trigger Created in your Zendesk Admin Center.
Creating the Rules for Parse and Extract
You then create the parsing rules which determine how you want to extract the value from the tickets.
- Click Add parsed value to open the Rule to extract a value from text section on the right-hand side.
Selecting Where to Extract the Value from
Select where to extract a value from. You can select Ticket Subject and/or one of the other options.
-
Ticket Subject
This is the Subject created for the ticket when it is first created.
If the Workflow is set to trigger when a ticket is updated, and it is set up to extract a value from the Ticket Subject, if the agent changes the subject and also sends a reply, this will also trigger the Workflow.
-
Ticket Description
In most cases, the Ticket Description is the same as the First Customer Message, that is the message from the customer (the end-user in Zendesk) that created the ticket.
If you have configured Zendesk differently (such as with a description as an internal note followed by the first message from the customer), you can set up the Workflow as First Customer Message or Ticket Description as relevant.
-
First Customer Message
The message that the customer first sent and which created the ticket.
-
Last Customer Message
The last message from the customer, sent usually when the agent has sent a reply to the ticket.
-
Any Customer Message
If a Workflow is set up for Updated tickets after tickets have been created, and a reply is received from the customer, the Workflow will be triggered retrospectively if the value can be extracted from any of the customer messages already in the ticket. In this case the value is extracted from the first presence of the value in customer's messages in the ticket.
If you want the Workflow to extract the value from either the Ticket Subject or the First Customer Message, you can select both of these.
It is only relevant to select one of the other options at a time. If you need to check more than one of the Customer Message options you can set these up in additional Workflows.
Selecting How to Extract the Value
In the How to extract the value drop-down, the following options are available.
- Use a Pattern to match the value
- Write my own Regular Expression
- Use AI to extract Value
Use a Pattern to match the value
Use a Pattern to match the value displays preset settings that you use to define what the value that you want to extract looks like.
When setting up the pattern, you add the following. Add as many of these as possible to ensure an exact match.
Match phrase before the value
You can enter a phrase that appears before the value you want to extract. This phrase will be used in the matching but will not be extracted. For example, if you want to merge tickets on an order number in the ticket, this may have "Order" or "No" before the value.
Any text is case sensitive. This setting assumes there is a space to be included at the end of the phrase.
Match phrase after the value
You can enter a phrase that appears after the value you want to extract. This phrase will be used in the matching but will not be extracted.
Any text is case sensitive. This setting assumes there is a space to be included at the beginning of the phrase.
Value to Extract
For the Value to Extract, select A Sequence of Letter or Digits or An Email Address.
Extracting A Sequence of Letter or Digits
You can extract a sequence of letters or digits, for example, for an Order Number.
Starts with can be used if the value to extract always starts with any specific character(s) and or number(s).
Any text is case sensitive.
Choose a format as relevant for the sequence. This must be selected, for example, "Digits", "Letters, upper or lower case", "Letters, upper case", "Letters, lower case", "Letters or digits".
Set up the number of characters long for the values to extract. You can enter this as the range of the number of characters (for example, between 5 and 8). To set this as an exact number of characters, enter the same number for each (for example, between 6 and 6).
If relevant, enter any characters for the Followed by to define any specific character(s) and/or number(s) that always follow the value to extract. Any text is case sensitive.
The following is an example of setting up the Pattern for the value to extract.
In this example, a phrase before the value to be extracted has been entered.
Testing the Pattern
You can test the pattern by entering a test sample and clicking Test. This displays the value that would be extracted.
For a step-by-step example of setting up the Workflow to extract an Order Number, refer to Example Workflow - Extracting the Order Number using Parsing Rules for a Structured Value.
Extracting an Email Address
You can use the Workflow to change the Requester of the ticket using the Email Address. This can be used if you are receiving automated email notifications or alerts where the emails come from an email such as "noreply@example.domain.com" , "accounts@example.domain.com", or "support@example.domain.com". This would usually be used if the ticket has been created in certain contexts, for example, when a customer submits a form, and the email in the ticket has been generated with structured content such as the following:
Email Address: annexample@gmail.com
Extracting the email address can then be used to update the requester of the ticket with the Change Requester option. For details, refer below to Change Requester.
Testing the Pattern
The following example shows a test when the Workflow is set up to extract an Email Address.
Writing your Own Regular Expression
You can select Write my own Regular Expression. Due to the complexity of Regular Expressions, only use this if you have expertise in writing these. If you need help with more complex rules, contact Swifteq with the Live Chat or email support@swifteq.com.support.
Write my own Regular Expression adds an area for your to enter the expression and the reminder displays that using this option requires expertise in regular expressions.
Testing the Pattern
When you have entered the Regular Expression, the Test section displays so you can test the pattern by entering a test sample and clicking Test. This displays the value that would be extracted.
Using AI to Extract the Value
You can select Use AI to extract value. This allows you to extract relevant information from tickets using OpenAI's ChatGPT. You tell ChatGPT what the value looks like, using plain English. These are the ChatGPT prompts.
- Select Use AI to extract value.
Note: To use OpenAI's ChatGPT in the Ticket Parser Autofill app, you do not need a paid OpenAI account but you need to purchase a subscription to the Ticket Parser Autofill app that makes it available. Refer to Subscribing to Ticket Parser Autofill, Managing your Billing.
If you do not have a subscription to use AI to extract, you will see the following message.
- Enter a value to describe What to extract, for example, "Order Number". The What to Extract value helps ChatGPT recognize the information to extract. This is entered as text and is used in conjunction with the Format of the value to extract that you enter below.
- The Format of the value to extract, tells ChatGPT what to look for. These are the ChatGPT prompts. You enter this using plain English and this describes the text and the format of the value you want ChatGPT to extract. Be as specific as you can. You can have as many rules as you need. You can also give an example of the value.
Note: The following is an example of what you can achieve. You need to enter and fine-tune the ChatGPT prompt depending on your own needs.
For a step-by-step example of setting up the Workflow with Use AI to extract value to extract a value, refer to Example Workflow - Using AI to extract the Customer Name.
Using Placeholders
You can include the following placeholders {{ticket.created_at}} or {{ticket.updated_at}} in the Format of the value to extract.
Using a Placeholder, you can use AI to extract information that is not in the exact format required. For example, if you want to extract the Order Date from the First Customer Message, the customer may have added this as the word “today” , “yesterday”, “last week” etc.
To use the Placeholder, you can copy this from the list of Supported Placehoiders.
Tip: In this example, the Custom Field that will be used for the Order Date is set up with the Zendesk Field Type of "Regex" using the Regular Expression provided by Zendesk to use the YYYY/MM/DD format.
The Format of the value to extract includes the text “given that the time now is” before the Placeholder. The reason for this is that, when using the API, ChatGPT does not know what time it is. For this use case, this additional text is key to making this work and needs to be provided in the prompt. In this example, the prompt instructs ChatGPT to think that the current time is the time when a ticket is created or updated, so that it can then calculate the relative date.
For a step-by-step example of setting up the Workflows using AI, refer to Example Workflow - Using AI to Extract an Order Date and Example Workflow - Using AI to Extract the Customer Address.
Testing the Pattern
The Test function is not currently included for Use AI to extract value but will be added in the near future.
Using AI Extract with Translate
In general, the extract should work in any language, even if you leave the prompt in English. If you are translating tickets (such as with Translate Conversations) there is no need to set up prompts in additional languages.
Submitting and Editing the Parsing Rules
Click Submit. The parsing rule displays in the Parsing Rules. This shows a summary of the rule.
From here you can edit the parsing rule by clicking the Edit icon, or delete it by clicking the x.
Adding Additional Parsed Value Rules
If needed, you can click Add parsed value to add additional rules for parsed values in the same way.
Where there is more than one rule, one of these has to match in order to extract a value. The extracted value is taken from the first extract rule that matches in the sequence of rules.
For example, you could set up rules to check for various ways a customer may provide the order number in the ticket.
Choosing how to Update the Ticket with the Extracted Value
Select how to update the ticket with the value that has been extracted by checkmarking one or more of the following:
- Add Tag to Ticket
- Add Comment to Ticket
- Set Custom Field Value
- Change Requester
You can select more than one action. For example, you could add the extracted value as a Tag in the ticket and also add this as a Comment to the ticket as an Internal Note in the same Workflow.
Add Tag to Ticket
Checkmarking the Add Tag to Ticket action adds the extracted value as a Zendesk Tag to the ticket.
If the extracted value has upper and lower cases characters and any spaces (such as "Urgent Order"), the value will be added as a Tag formatted in lowercase. So for this example the Tag will be added as "urgent_order".
Add Comment to Ticket
Checkmarking the Add Comment to Ticket action adds the extracted value as a Comment to the ticket.
You then select to add this either as an Internal Note or as a Public Reply.
Care should be taken when selecting Public Reply. For example, you could add a Custom Prompt that adds a Public Reply to reply to customers and this could be appropriate for very specific cases, such as a generic reply to refund request, but not as a generic prompt for all kinds of messages.
Set Custom Field Value
Checkmarking the Set Custom Field Value action updates the extracted value to the Custom Field that you select.
Ensure that the Zendesk Custom Field has been set up to accept the output that will be updated. For example, if the extracted value is alphanumeric, ensure the Custom Field will accept an alphanumeric value and not just a numeric value.
Select the Custom Field from the drop-down.
The list of Custom Fields shows all fields, but some of these may be configured as inactive and hidden in Zendesk workspace.
If the output has upper and lower cases characters and any spaces (such as "Velvet Red Geraniums"), this will be added to the Custom Field in the same case with the spaces. So for this example the Custom Field will be added unchanged as "Velvet Red Geraniums".
If the Custom Field you need does not already exist when you are setting up the Workflow, you can add it from the Zendesk Admin Centre (using a different window) and then click Refresh fields from Zendesk so you can select it.
Change Requester
You can use the Workflow to change the Requester. This can be used if you are receiving automated email notifications or alerts where the emails come from an email such as "noreply@example.domain.com" , "accounts@example.domain.com", or "support@example.domain.com". In these instances, the ticket would have been created in certain contexts, for example, when a customer submits a form, and the ticket would be generated with structured content such as the following:
Email Address: annexample@gmail.com
Phone Number: 004404567890
To use Change Requester, set up the Workflow to extract the email address or the phone number.
- Extract an Email Address using a pattern to match the value and selecting An Email Address.
If the user exists in Zendesk for the extracted Email Address, the relevant user name will show as the Requester and reply To in the ticket.
If the user does not exist in Zendesk for the extracted Email Address, the Requester and reply To in the ticket will show the email address that was extracted.
- Extract a Phone Number using a pattern to match the value with any relevant text and sequence of digits.
If the user exists in Zendesk for the extracted Phone Number, the relevant user name will show as the Requester and reply To in the ticket.
If the user does not exist in Zendesk for the extracted Email Address or Phone Number, the Requester and reply To in the ticket will show as "Unknown".
Then for the Update Ticket option, select Change Requester and either Email Address or Phone Number.
Enabling and Saving the Workflow
When you have set up a Workflow, Enable it and Save it. For details on how to enable and save the Workflow, opening the Zendesk Trigger and how to edit, disable or delete a Workflow, refer to Enabling and Saving the Workflow, Opening the Zendesk Trigger, Editing, Disabling or Deleting a Workflow.
Comments
0 comments
Article is closed for comments.