Skip to main content
New Participant
March 4, 2024
4. Future Consideration

Paths forward ticket fields in-order

Related products:Agent Studio
  • March 4, 2024
  • 3 replies
  • 36 views

Wanted to put this idea out there as we have been running into this issue when doing the smart handoff to Jira from a Path. Although the questions were asked in order once the Path was initiated, the slots were not submitted in order to Jira via the smart handoff. This is important for us, because we have a Jira automation to clean up the Summary of the ticket as it creates a long, run on Summary with the questions in it. The Jira automation focuses on the first question being the same every time to trigger, so really need that to be consistent.

3 replies

Ajay Merchia
Community Manager
March 7, 2024

@yagarwal I think you had a script that can be used in an iPaaS for this?

@tgartner this is still a good idea and we’ll consider more robust ways to connect Paths to your handoff options (like structuring the slot values in a preordained order). Thanks for the feedback!

Ajay Merchia
Community Manager
March 7, 2024
1. New4. Future Consideration
yagarwal
Employee
March 8, 2024

Thanks for submitting the idea @tgartner!

We will consider submitting ticket fields in-order from Paths. It would help maintain your automations & improve ticket readability for agents.

 

We caught up on email, but re-posting here: here’s a handy python script to extract slot names from ANY ticket descriptions:

import re

def extract_key_value_pairs(description):
# Define regex patterns for each key-value pair
keys_pattern = r"(submitted by|referral type|candidate email|candidate name)"
slot1_pattern = r"submitted by: (.*?)(?=" + keys_pattern + r"|$)"
slot2_pattern = r"referral type: (.*?)(?=" + keys_pattern + r"|$)"
slot3_pattern = r"candidate email: (.*?)(?=" + keys_pattern + r"|$)"
slot4_pattern = r"candidate name: (.*?)(?=" + keys_pattern + r"|$)"

# Search for matches in the description
slot1_match = re.search(slot1_pattern, description)
slot2_match = re.search(slot2_pattern, description)
slot3_match = re.search(slot3_pattern, description)
slot4_match = re.search(slot4_pattern, description)

# Extract matched groups if found, else return None
slot1 = slot1_match.group(1) if slot2_match else None
slot2 = slot2_match.group(1) if slot2_match else None
slot3 = slot3_match.group(1) if slot3_match else None
slot4 = slot4_match.group(1) if slot4_match else None

return slot1, slot2, slot3, slot4

# Example description
description = "i need to submit a new referral: candidate name: John Doe referral type: Executive candidate email: john.doe@gmail.com submitted by: Jane Doe"

# Extract and print the key value pairs
extracted_pairs = extract_key_value_pairs(description)
print(f"Example Ticket Description: {description}")
print(f"Submitted by: {extracted_pairs[0]}")
print(f"Referral tyoe: {extracted_pairs[1]}")
print(f"Candidate email: {extracted_pairs[2]}")
print(f"Candidate name: {extracted_pairs[3]}")