need ticket count for payload output 200

ShaibaazFaheem
Tera Contributor

Hello Community!

 

I wanted to count the number of tickets where the Payload output status is 200 and the ticket hop was routed to a specific group.

 

Any help is much appreciated.

1 REPLY 1

Matthew_13
Mega Sage

Hi Buddy,

You’ll need to confirm where “Payload output status” is stored and what you mean by “ticket hop”.

If “ticket hop” = the ticket was ever routed to that group (assignment group changed)

Use sys_audit to count distinct tickets that had assignment_group changed to the target group, then filter those tickets by payload status = 200.

Hop to group (count distinct tickets):

  • Table: sys_audit

  • Conditions:

    • tablename = incident (or your ticket table)

    • fieldname = assignment_group

    • newvalue = <target group sys_id>

  • Aggregate: COUNT DISTINCT documentkey

Then apply your payload filter:

  • If status is on the ticket (ex: u_payload_status = 200), just add that to the ticket query.

  • If status is in a REST/integration log table, you’ll need to join (DB view) or do a 2-step script (pull ticket sys_ids where status=200, then intersect with the audit results).

If you only mean “currently assigned to that group”

Then it’s simpler—just run a report/aggregate on the ticket table with:

  • payload_status = 200

  • assignment_group = <target group>

But that doesn’t prove it “hopped,” only that it’s assigned there now.

 

@ShaibaazFaheem - Please mark Accepted Solution and Thumbs Up if you found Helpful!