Ticket

  • 15.5
This article is may not be up to date with the latest stable release of M4.

Description

The Ticket endpoint provides the API consumer with access to methods pertaining to tickets and related data objects. The endpoint allows consumers to load ticket data, add new tickets, cancel tickets, get tickets in the queue, dequeue tickets and add/link services to tickets.

Methods

URL base/Workforce/Ticket/Specification
Action GET
Description Returns a data dictionary that details the available web service methods related to the Ticket.
Parameters None
 Returns  A JSON object with method descriptions
Sample Return Object
[
  {
    "HttpAction": "Get",
    "MethodName": "GetTicket",
    "Description": "Returns the record for a single 'Ticket' given the passed in ID value (see Path).",
    "Path": "/Ticket/GetTicket/25032"
  },
  {
    "HttpAction": "Get",
    "MethodName": "GetTickets",
    "Description": "Returns all 'Tickets' in the database (see Path).",
    "Path": "/Ticket/GetTickets"
  }
]
URL base/Workforce/Ticket/GetTicket/ID
Action GET
Description Returns a Ticket object when given an ID of a valid Ticket in the M4 database.
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a Ticket in the M4 database.
Returns A JSON Ticket data object
Sample Return Object
{
    "ID": 61,
    "TicketNumber": "Trouble Ticket-61",
    "TicketState": 2,
    "ModifiedBy": "vmirzoyan",
    "Priority": 2,
    "ServingArea": 0,
    "StructureLink": 292289,
    "CustomerID": 292799,
    "TimeOpened": "2013-10-30T09:54:35.85",
    "ReportedBy": "",
    "CreatedBy": "pjohnson",
    "ChangedBy": "X",
    "TicketCode": 75,
    "AssignmentWorkflowStatus": null,
    "AssignmentReturnMessage": "",
    "WONumber": "",
    "TicketType": 1,
    "TicketCategory": 7
}
URL base/Workforce/Ticket/GetTicketsByCustomer/CustomerID
Action GET
Description Returns a list of Ticket objects when given an ID of a valid Customer in the M4 database.
Parameters
Name Required? Type Description
CustomerID Yes Integer An integer value representing the ID of a Customer in the M4 database.
Returns A list of JSON Ticket data objects
Sample Return Object
[
	{
	    "ID": 61,
	    "TicketNumber": "Trouble Ticket-61",
	    "TicketState": 2,
	    "ModifiedBy": "vmirzoyan",
	    "Priority": 2,
	    "ServingArea": 0,
	    "StructureLink": 292289,
	    "CustomerID": 292799,
	    "TimeOpened": "2013-10-30T09:54:35.85",
	    "ReportedBy": "",
	    "CreatedBy": "pjohnson",
	    "ChangedBy": "X",
	    "TicketCode": 75,
	    "AssignmentWorkflowStatus": null,
	    "AssignmentReturnMessage": "",
	    "WONumber": "",
	    "TicketType": 1,
	    "TicketCategory": 7
	},
	{
	    "ID": 62,
	    "TicketNumber": "Trouble Ticket-62",
	    "TicketState": 2,
	    "ModifiedBy": "vmirzoyan",
	    "Priority": 2,
	    "ServingArea": 0,
	    "StructureLink": 292289,
	    "CustomerID": 292799,
	    "TimeOpened": "2013-10-30T09:54:35.85",
	    "ReportedBy": "",
	    "CreatedBy": "pjohnson",
	    "ChangedBy": "X",
	    "TicketCode": 75,
	    "AssignmentWorkflowStatus": null,
	    "AssignmentReturnMessage": "",
	    "WONumber": "",
	    "TicketType": 1,
	    "TicketCategory": 7
	}
]
URL base/Workforce/Ticket/GetTicketByTicketNumber
Action POST
Description Returns the Ticket object associated with the ticket number in the M4 database.
Parameters
Name Required? Type Description
TicketNumber Yes String The ticket number of a ticket in the M4 database.
Sample JSON Package
{
    "TicketNumber": "TT38928374"
}
Returns A JSON Ticket data object
Sample Return Object
{
    "ID": 61,
    "TicketNumber": "Trouble Ticket-61",
    "TicketState": 2,
    "ModifiedBy": "vmirzoyan",
    "Priority": 2,
    "ServingArea": 0,
    "StructureLink": 292289,
    "CustomerID": 292799,
    "TimeOpened": "2013-10-30T09:54:35.85",
    "ReportedBy": "",
    "CreatedBy": "pjohnson",
    "ChangedBy": "X",
    "TicketCode": 75,
    "AssignmentWorkflowStatus": null,
    "AssignmentReturnMessage": "",
    "WONumber": "",
    "TicketType": 1,
    "TicketCategory": 7
}
URL base/Workforce/Ticket/GetTicketByTicketNumberAndType
Action POST
Description Returns the Ticket object associated with the ticket number and ticket type in the M4 database.
Parameters
Name Required? Type Description
TicketNumber Yes String The ticket number of the ticket in the M4 database.
TicketTypeID Yes Integer The ticket type of the ticket in the M4 database.
Sample JSON Package
{
      "TicketTypeID": 5,
      "TicketNumber": "TT235498723"
}
Returns A JSON Ticket data object
Sample Return Object
{
  "ID": 16,
  "TicketNumber": "TT235498723",
  "TicketState": 1,
  "ModifiedBy": "1",
  "Priority": 1,
  "ServingArea": 0,
  "StructureLink": null,
  "CustomerID": null,
  "TimeOpened": "2013-04-11T10:09:50.547",
  "ReportedBy": "",
  "CreatedBy": "1",
  "ChangedBy": "D",
  "TicketCode": 259,
  "AssignmentWorkflowStatus": null,
  "AssignmentReturnMessage": "",
  "WONumber": "",
  "TicketType": 5,
  "TicketCategory": 19
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

TicketTypeID:
  • The TicketTypeID must be a valid Ticket Type in the database.
URL base/Workforce/Ticket/CheckDuplicateTicketByCustomer
Action POST
Description Returns a boolean value (true/false) dictating whether a duplicate ticket exists for the specified customer service and ticket code.
Parameters
Name Required? Type Description
CustomerID Yes Integer The ID of a Customer Service in the M4 database.
TicketCodeID Yes Integer The ticket code to be searched.
Sample JSON Package
{
      "CustomerID": 255556,
      "TicketCodeID": 169
}
Returns A JSON boolean data object
Sample Return Object
{
  "Value": true
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

CustomerID:
  • The CustomerID must be a valid Customer Service in the database.
TicketCodeID:
  • The TicketCodeID must be a valid Ticket Code in the database.
URL base/Workforce/Ticket/AddTicket
Action POST
Description This method allows for create a ticket. The newly created ticket object is returned. The TicketCodeID and ServingAreaID are required fields.
Parameters
Name Required? Type Description
TicketCodeID Yes Integer The Ticket Code for the ticket.
ServingAreaID Yes Integer The Serving Area for the ticket.
TicketNumber No String The Ticket Number for the ticket. This value can be set to null to have the system automatically generate the ticket number.
TicketStatusID No Integer The Ticket Status for the ticket. This value can be set to null to have the system automatically assign the ticket to a pending status.
TimeOpened No DateTime The time the ticket was opened. This value can be set to null to have the system automatically assign the current date/time.
TicketPriorityID No Integer The priority for the ticket.
StructureID No Integer The structure assigned to the ticket.
CustomerID No Integer The customer assigned to the ticket.
ReportedBy No String The name of the person that reported the ticket.
CreatedBy No String The name of the person that created the ticket.
ModifiedBy No String The name of the person that modified the ticket.
WorkOrderNumber No String The Work Order Number for a valid Work Order.
Sample JSON Package
{
      "TicketCodeID": 4,
      "ServingAreaID": 16,
      "TicketNumber": "TT-16131",
      "TicketStatusID": 4,
      "TimeOpened": "2017-05-10T00:44:38.3305082-04:00",
      "TicketPriorityID": 3,
      "StructureID": 380568,
      "CustomerID": 442845,
      "ReportedBy": "James Griffin",
      "CreatedBy": "Tia Smith",
      "ModifiedBy": "Joan Smith",
      "WorkOrderNumber": "WO453434"
}
Returns A JSON Ticket data object
Sample Return Object
{
  "ID": 16131,
  "TicketNumber": "TT-16131",
  "TicketState": 4,
  "ModifiedBy": "Joan Simmons",
  "Priority": 3,
  "ServingArea": 16,
  "StructureLink": 380568,
  "CustomerID": 442845,
  "TimeOpened": "2017-05-10T00:44:38.33",
  "ReportedBy": "Jake Crawford",
  "CreatedBy": "Maria Jenkins",
  "ChangedBy": "A",
  "TicketCode": 4,
  "AssignmentWorkflowStatus": null,
  "AssignmentReturnMessage": "",
  "WONumber": "TestWorkOrder9",
  "TicketType": 1,
  "TicketCategory": 4
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
 
TicketCodeID:
  • The TicketCodeID must be a valid Ticket Code in the database.
ServingAreaID:
  • The ServingAreaID must be a valid Serving Area in the database.
TicketNumber:
  • The TicketNumber must be unique among all existing tickets.
TicketStatusID:
  • The TicketStatusID must be a valid Ticket Status in the database.
  • The transition template for the Ticket Status must match the transition template of the Ticket Code.
TicketPriorityID:
  • The TicketPriorityID must be a valid ticket priority.
StructureID:
  • The StructureID must be a valid Structure.
CustomerID:
  • The CustomerID must be a valid Customer.
WorkOrderNumber:
  • The WorkOrderNumber must link to a valid Work Order.
URL base/Workforce/Ticket/UpdateTicket
Action POST
Description This method allows for the updating of ticket information. The updated ticket object is returned. The ID, TicketCodeID, ServingAreaID, TicketNumber and TicketStatusID are required fields.
Parameters
Name Required? Type Description
TicketCodeID Yes Integer The Ticket Code for the ticket.
ServingAreaID Yes Integer The Serving Area for the ticket.
TicketNumber No String The Ticket Number for the ticket. This value can be set to null to have the system automatically generate the ticket number.
TicketStatusID No Integer The Ticket Status for the ticket. This value can be set to null to have the system automatically assign the ticket to a pending status.
TimeOpened No DateTime The time the ticket was opened. This value can be set to null to have the system automatically assign the current date/time.
TicketPriorityID No Integer The priority for the ticket.
ReportedBy No String The name of the person that reported the ticket.
CreatedBy No String The name of the person that created the ticket.
ModifiedBy No String The name of the person that modified the ticket.
WorkOrderNumber No String The Work Order Number for a valid Work Order.
Sample JSON Package
{
	"ID": 425,
	"TicketNumber": "TT34538",
	"TicketStatusID": 2,
	"ModifiedBy": "Joan Simmons",
	"ServingAreaID": 12,
	"TicketCodeID": 1332,
	"TicketPriorityID": 2,
	"ReportedBy": "Jake Crawford",
	"WorkOrderNumber": "WV9883498"
}
Returns A JSON Ticket data object
Sample Return Object
{
  "ID": 16131,
  "TicketNumber": "TT-16131",
  "TicketState": 4,
  "ModifiedBy": "Joan Simmons",
  "Priority": 3,
  "ServingArea": 16,
  "StructureLink": 380568,
  "CustomerID": 442845,
  "TimeOpened": "2017-05-10T00:44:38.33",
  "ReportedBy": "Jake Crawford",
  "CreatedBy": "Maria Jenkins",
  "ChangedBy": "A",
  "TicketCode": 4,
  "AssignmentWorkflowStatus": null,
  "AssignmentReturnMessage": "",
  "WONumber": "TestWorkOrder9",
  "TicketType": 1,
  "TicketCategory": 4
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

TicketCodeID:
  • The TicketCodeID must be a valid Ticket Code in the database.
ServingAreaID:
  • The ServingAreaID must be a valid Serving Area in the database.
TicketNumber:
  • The TicketNumber must be unique among all existing tickets.
TicketStatusID:
  • The TicketStatusID must be a valid Ticket Status in the database.
  • The transition template for the Ticket Status must match the transition template of the Ticket Code.
TicketPriorityID:
  • The TicketPriorityID must be a valid ticket priority.
StructureID:
  • The StructureID cannot be changed.
CustomerID:
  • The CustomerID cannot be changed.
WorkOrderNumber:
  • The WorkOrderNumber must link to a valid Work Order.
URL base/Workforce/Ticket/CancelTicket
Action POST
Description Cancels a ticket and all related scheduled services.
Parameters
Name Required? Type Description
TicketID Yes Integer The TicketID of a Ticket in the M4 database.
Sample JSON Package
{
      "TicketID": 15359
}
Returns A JSON message data object
Sample Return Object
{
  "Message": "The Ticket with ID [15359] was cancelled successfully and all assigned work services and appointments have been cancelled."
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

TicketID:
  • The TicketID must be a valid Ticket in the database.
  • The TicketID cannot already be cancelled (i.e. a ticket cannot be 're-cancelled').
URL base/Workforce/Ticket/ClearTicket
Action POST
Description This method clears a ticket. A ticket can only be cleared if all appointments associated with the ticket have been cleared.
Parameters
Name Required? Type Description
TicketID Yes Integer The ID of a ticket in the M4 database.
Sample JSON Package
{
      "TicketID": 169
}
Returns A collection of JSON schedules/appointments associated with the ticket.
Sample Return Object
[
    {
        "ID": 51,
        "UserID": null,
        "TechID": null,
        "ApptStart": "2018-10-28T12:59:29.313",
        "ApptEnd": "2018-10-28T16:59:29.313",
        "TicketState": 7,
        "TicketID": 155,
        "DispatcherID": null,
        "TicketType": 3,
        "ChangedBy": "A",
        "DisplayValue": "DisplayValue",
        "TicketCode": 2,
        "ApptBlock": "ApptB",
        "CanReschedule": true,
        "Reminder": 55,
        "TimeCleared": null,
        "TechTimeCleared": null,
        "ChangedApptEndTime": false,
        "LastUpdated": "2018-10-28T12:59:29.31",
        "RecurrenceRule": null,
        "RecurrenceParentID": null,
        "RecurrenceRuleKeyStr": "RecurrenceRuleKeyStr",
        "RecurrenceChildRuleKeyStr": "RecurrenceChildRuleKeyStr",
        "TimeClosed": null
    },
    {
        "ID": 52,
        "UserID": null,
        "TechID": null,
        "ApptStart": "2018-10-28T12:59:29.313",
        "ApptEnd": "2018-10-28T16:59:29.313",
        "TicketState": 7,
        "TicketID": 155,
        "DispatcherID": null,
        "TicketType": 3,
        "ChangedBy": "A",
        "DisplayValue": "DisplayValue",
        "TicketCode": 2,
        "ApptBlock": "ApptB",
        "CanReschedule": true,
        "Reminder": 55,
        "TimeCleared": null,
        "TechTimeCleared": null,
        "ChangedApptEndTime": false,
        "LastUpdated": "2018-10-28T12:59:29.31",
        "RecurrenceRule": null,
        "RecurrenceParentID": null,
        "RecurrenceRuleKeyStr": "RecurrenceRuleKeyStr",
        "RecurrenceChildRuleKeyStr": "RecurrenceChildRuleKeyStr",
        "TimeClosed": null
    }
]
                    
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

TicketID:
  • The TicketID must link to a valid ticket in the database.
  • The ticket must not already be cleared.
  • The ticket must be assigned to a ticket code.
  • The transition template referenced by the ticket code must be valid.
  • A "Cleared" status must be defined for the matching transition template referenced by the ticket code.
  • All associated schedules/appointments must be "Cleared".
URL base/Workforce/Ticket/GetNextTicketInQueue
Action GET
Description Returns the next ticket to be processed in the queue.
Parameters None
 Returns  A JSON Queued Ticket object
Sample Return Object
{
  "ID": 2602,
  "ApptID": 11563,
  "TicketID": 6296,
  "FromStatusDesc": "Opened",
  "ToStatusDesc": "Acknowledged",
  "StatusChangeTime": "2017-04-30T20:56:34.09",
  "IsProcessed": false,
  "TicketItem": {
    "ID": 6296,
    "TicketNumber": "TT-6296",
    "TicketState": 63,
    "ModifiedBy": "",
    "Priority": null,
    "ServingArea": 19,
    "StructureLink": null,
    "CustomerID": null,
    "TimeOpened": "2017-04-30T20:56:34.06",
    "ReportedBy": "",
    "CreatedBy": "",
    "ChangedBy": null,
    "TicketCode": 2,
    "AssignmentWorkflowStatus": null,
    "AssignmentReturnMessage": "",
    "WONumber": "",
    "TicketType": 1,
    "TicketCategory": 4
  },
  "TicketNumber": "TT-6296"
}
URL base/Workforce/Ticket/DequeueTicket
Action POST
Description Removes/dequeues a ticket that is in the queue.
Parameters
Name Required? Type Description
QueueID Yes Integer The QueueID of a Queued Ticket in the M4 database.
Sample JSON Package
{
      "QueueID": 5541
}
Returns A JSON message data object
Sample Return Object
{
  "Message": "The Queued Ticket with queue ID [5541] was dequeued successfully and is no longer in the queue."
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

QueueID:
  • The QueueID must be a valid Queued Ticket in the database.
  • The QueueID cannot already be processed/dequeued.
URL base/Workforce/Ticket/AddServiceToTicket
Action POST
Description This service method allows for the creation of a work service item against a customer service. Both the CustomerService and the WorkService objects are required.
Customer Service Parameters
Name Required? Type Description
ConnectDate Yes DateTime The Connect Date for the Customer Service.
CustomerServiceNumber No String The Service Number for the customer service. If the value is null, the service number will be generated automatically.
ServiceCode No String The Service Code for the service.
Description No String The description of the service.
StatusID No Integer The initial status of the service. If the value is null, the status will be set to pending.
PhoneNumber No String The phone number associated with the service.
SourceTable No String The source table associated with the source record for the service.
SourceID No Integer The source ID associated with the source record for the service.
Work Service Parameters
Name Required? Type Description
TicketID Yes Integer The Ticket ID for the work service item.
LineCardID No Integer The Line Card for the work service item.
EnableAuto No Boolean Boolean value for enabling auto for the work service item.
RequestedSpeed No String Description of the requested speed associated with the work service item.
Technology No String Description of the technology associated with the work service item.
DueDate No DateTime The date the work service item is due.
TicketCodeID Yes Integer The TicketCode for the work service item.
StructureID No Integer The Structure for the work service item.
ServingAreaID No Integer The ServingArea for the work service item.
Sample JSON Package
{
      "CustomerService": {
        "ConnectDate": "2017-05-26T02:25:22.4509786-04:00",
        "CustomerServiceNumber": "DVT435345",
        "ServiceCode": "TGV898",
        "Description": "Description of service here",
        "StatusID": 1,
        "PhoneNumber": "4445556576",
        "SourceTable": "SourceTable1",
        "SourceID": 45
      },
      "WorkService": {
        "TicketID": 258,
        "LineCardID": 457,
        "EnableAuto": true,
        "RequestedSpeed": "Requested speed description goes here",
        "Technology": "Technology description",
        "DueDate": "2017-05-26T00:00:00-04:00",
		"TicketCodeID": 123,
		"StructureID": 64657,
		"ServingAreaID": 34
      }
    }
Returns A JSON message data object
Sample Return Object
{
  "Message": "The customer service and associated work item were successfully added to the system."
}
Customer Service Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
 
CustomerServiceNumber:
  • The CustomerServiceNumber, if specified, must be unique for all customer services in the database.
StatusID:
  • The StatusID must link to a valid customer service status in the database.
PhoneNumber:
  • The PhoneNumber, if specified, must be unique among all active customer services.
SourceTable/SourceID:
  • The SourceTable and SourceID fields are fields that work in combination. Both fields must be null or both fields must contain data.
  • The SourceTable/SourceID combination, if specified, must be unique among all active customer services.
Work Service Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.
 
TicketID:
  • The TicketID must be a valid Ticket in the database.
  • The TicketID cannot already be cancelled (i.e. it must be active)
  • The TicketID must be associated with a customer.
  • The TicketID must be associated with a structure.
LineCardID:
  • The LineCardID, if specified, must be a valid Line Card in the database.
TicketCodeID:
  • The TicketCodeID must be a valid Ticket Code in the database.
StructureID:
  • The StructureID, if specified, must be a valid Structure in the database.
ServingAreaID:
  • The ServingAreaID, if specified, must be a valid Serving Area in the database.
URL base/Workforce/Ticket/LinkServiceToTicket
Action POST
Description This service method allows for the creation of a work service item against an existing customer service.
Parameters
Name Required? Type Description
CustomerServiceID Yes Integer The associated customer service associated with the work item.
TicketID Yes Integer The Ticket ID for the work service item.
LineCardID No Integer The Line Card for the work service item.
EnableAuto No Boolean Boolean value for enabling auto for the work service item.
RequestedSpeed No String Description of the requested speed associated with the work service item.
Technology No String Description of the technology associated with the work service item.
DueDate No DateTime The date the work service item is due.
TicketCodeID Yes Integer The Ticket Code for the work service item.
StructureID No Integer The Structure for the work service item.
ServingAreaID No Integer The Serving Area for the work service item.
Sample JSON Package
{
      "CustomerServiceID": 944,
      "TicketID": 15356,
      "LineCardID": 29561,
      "EnableAuto": true,
      "RequestedSpeed": "Requested speed description goes here",
      "Technology": "Technology description",
      "DueDate": "2017-05-10T00:00:00-04:00",
	  "TicketCodeID": 123,
	  "StructureID": 76475,
	  "ServingAreaID": 13
}
Returns A JSON message data object
Sample Return Object
{
      "CustomerServiceID": 944,
      "TicketID": 15356,
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General CustomerServiceID/TicketID:
  • The CustomerServiceID/TicketID combination cannot already exist in the system as an open work item.
  • The associated customer for the service must match the associated customer for the Ticket.
CustomerServiceID:
  • The CustomerServiceID must be a valid customer service the database.
  • The associated customer for the service cannot be deleted.
TicketID:
  • The TicketID must be a valid Ticket in the database.
  • The TicketID cannot already be cancelled (i.e. it must be active)
  • The TicketID must be associated with a customer.
  • The TicketID must be associated with a structure.
TicketCodeID:
  • The TicketCodeID must be a valid Ticket in the database.
StructureID:
  • The StructureID, if specified, must be a valid Structure in the database.
ServingAreaID:
  • The ServingAreaID, if specified, must be a valid Serving Area in the database.
URL base/Workforce/Ticket/UnlinkServiceFromTicket
Action POST
Description This service method allows for the unlinking of a work service item from an existing customer service.
Parameters
Name Required? Type Description
TicketID Yes Integer The Ticket ID for the work service item.
CustomerServiceID Yes Integer The associated customer service associated with the work item.
NetworkDescription No String Description of the network associated with the work service item. Can be blank.
Sample JSON Package
{
    "TicketID": 15356,
    "CustomerServiceID": 944
    "NetworkDescription": ""
}
Returns A JSON message data object
Sample Return Object
{
    "TicketID": 15356,
    "CustomerServiceID": 944
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General CustomerServiceID/TicketID:
  • The CustomerServiceID/TicketID combination must already exist in the system as an open work item.
Linecard:
  • There must not be a linecard attached to the TicketID / CustomerServiceID being unlinked.
URL base/Workforce/Ticket/GetConfigTicketFieldsByCustomFieldSearch
Action POST
Description Searches custom ticket config fields and returns all matching results based on the supplied search criteria.
Parameters - Dictionary of search terms (field names are not defined). Please note that all fields (field names and values) are Strings. All search terms are combined to perform a boolean 'AND' search.
Name Required? Type Description
"SampleField1" Yes String This is just an example, but here "SampleField1" would be the field to be searched.
"SampleField2" Yes String This is just an example, but here "SampleField2" would be the field to be searched.
"SampleField3" Yes String This is just an example, but here "SampleField3" would be the field to be searched.
Sample JSON Package
{
      "SampleFieldName1": "Search Value for SampleField1",
      "SampleFieldName2": "Search Value for SampleField2",
      "SampleFieldName3": "Search Value for SampleField3"
}
Returns A JSON Dictionary data object (only configured fields are returned)
Sample Return Object - Please note that all configured fields are returned in the result (not just the ones that are used in the search criteria).
{
      "SampleFieldName1": "SampleField1 Value",
      "SampleFieldName2": "SampleField2 Value",
      "SampleFieldName3": "SampleField3 Value",
      "SampleFieldName4": "SampleField4 Value",
      "SampleFieldName5": "SampleField5 Value",
      "SampleFieldName6": "SampleField6 Value",
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

Configuration:
  • There must be at least one configured custom field.
Configuration:
  • The fields must be configured correctly.
Field Names:
  • Only syntactically correct JSON can be supplied. This means that field names must be unique within the supplied dictionary parameter.
Field Names:
  • The field supplied in the dictionary parameter must be the same field(s) specified in the configuration.
URL base/Workforce/Ticket/LinkCircuitToTicket
Action POST
Description This service method allows for the linking of a circuit to an existing ticket.
Parameters
Name Required? Type Description
CircuitID Yes Integer The associated circuit associated with the work item.
TicketID Yes Integer The Ticket ID for the work service item.
Sample JSON Package
{
      "CircuitID": 94,
      "TicketID": 156
}
Returns A JSON message data object
Sample Return Object
{
      "CircuitID": 94,
      "TicketID": 156
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General CircuitID/TicketID:
  • The CircuitID/TicketID combination cannot already exist in the system.
CircuitID:
  • The CircuitID must be a valid circuit the database.
TicketID:
  • The TicketID must be a valid Ticket in the database.
URL base/Workforce/Ticket/LinkCustomerNetworkToTicket
Action POST
Description This service method allows for the linking of a customer network to an existing ticket.
Parameters
Name Required? Type Description
CustomerNetworkID Yes Integer The associated Customer Network associated with the work item.
TicketID Yes Integer The Ticket ID for the work service item.
Sample JSON Package
{
      "CustomerNetworkID": 94,
      "TicketID": 156
}
Returns A JSON message data object
Sample Return Object
{
      "CustomerNetworkID": 94,
      "TicketID": 156
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General CustomerNetworkID/TicketID:
  • The CustomerNetworkID/TicketID combination cannot already exist in the system.
CustomerNetworkD:
  • The CustomerNetworkID must be a valid Customer Network the database.
TicketID:
  • The TicketID must be a valid Ticket in the database.
URL base/Workforce/Ticket/LinkTicketToProject
Action POST
Description This service method allows for the linking of a project to an existing ticket.
Parameters
Name Required? Type Description
ProjectID Yes Integer The associated Project associated with the work item.
TicketID Yes Integer The Ticket ID for the work service item.
Sample JSON Package
{
      "ProjectID": 94,
      "TicketID": 156
}
Returns A JSON message data object
Sample Return Object
{
      "ProjectID": 94,
      "TicketID": 156
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General ProjectID/TicketID:
  • The ProjectID/TicketID combination cannot already exist in the system.
ProjectID:
  • The ProjectID must be a valid Project the database.
TicketID:
  • The TicketID must be a valid Ticket in the database.
URL base/Workforce/Ticket/UnlinkCircuitFromTicket
Action POST
Description This service method allows for the unlinking of a circuit from a related ticket.
Parameters
Name Required? Type Description
CircuitID Yes Integer The associated circuit associated with the work item.
TicketID Yes Integer The Ticket ID for the work service item.
Sample JSON Package
{
      "CircuitID": 94,
      "TicketID": 156
}
Returns A JSON message data object
Sample Return Object
{
      "CircuitID": 94,
      "TicketID": 156
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General CircuitID/TicketID:
  • The CircuitID/TicketID combination must already exist in the system.
CircuitID:
  • The CircuitID must be a valid circuit the database.
TicketID:
  • The TicketID must be a valid Ticket in the database.
URL base/Workforce/Ticket/UnlinkCustomerNetworkFromTicket
Action POST
Description This service method allows for the unlinking of a customer network from a related ticket.
Parameters
Name Required? Type Description
CustomerNetworkID Yes Integer The associated Customer Network associated with the work item.
TicketID Yes Integer The Ticket ID for the work service item.
Sample JSON Package
{
      "CustomerNetworkID": 94,
      "TicketID": 156
}
Returns A JSON message data object
Sample Return Object
{
      "CustomerNetworkID": 94,
      "TicketID": 156
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General CustomerNetworkID/TicketID:
  • The CustomerNetworkID/TicketID combination must already exist in the system.
CustomerNetworkD:
  • The CustomerNetworkID must be a valid Customer Network the database.
TicketID:
  • The TicketID must be a valid Ticket in the database.
URL base/Workforce/Ticket/UnlinkTicketFromProject
Action POST
Description This service method allows for the unlinking of a project from a related ticket. It will NOT remove the associated task.
Parameters
Name Required? Type Description
ProjectID Yes Integer The associated Project associated with the work item.
TicketID Yes Integer The Ticket ID for the work service item.
Sample JSON Package
{
      "ProjectID": 94,
      "TicketID": 156
}
Returns A JSON message data object
Sample Return Object
{
      "ProjectID": 94,
      "TicketID": 156
}
Business Rules
Any violations of these business rules result in an appropriate error message being returned to the API consumer.

General ProjectID/TicketID:
  • The ProjectID/TicketID combination must already exist in the system.
ProjectID:
  • The ProjectID must be a valid Project the database.
TicketID:
  • The TicketID must be a valid Ticket in the database.
URL base/Workforce/Ticket/GetServicesByTicket/ID
Action GET
Description Returns all Services linked to a given Ticket ID.
Version Added in 19.3.8
Parameters
Name Required? Type Description
ID Yes Integer An integer value representing the ID of a Ticket in the M4 database.
Returns A JSON Customer data object
Sample Return Object
[
    {
        "TicketID": 2985278,
        "CustomerLink": 693039,
        "AssignmentWorkflowStatus": null,
        "AssignmentReturnMessage": "",
        "NetworkDesc": "",
        "LinecardID": null,
        "EnableAuto": false,
        "RequestedSpeed": "",
        "Technology": "",
        "Comment": "",
        "DueDate": "",
        "ServiceTypeName": "",
        "PhoneNumber": "",
        "LinkedPhoneNumber": "",
        "ServiceTicketCode": "",
        "ServiceTicketCategory": "",
        "TicketCodeID": 0,
        "StructureID": 0,
        "ServingAreaID": 0
    },
    {
        "TicketID": 2985278,
        "CustomerLink": 693040,
        "AssignmentWorkflowStatus": null,
        "AssignmentReturnMessage": "",
        "NetworkDesc": "",
        "LinecardID": null,
        "EnableAuto": false,
        "RequestedSpeed": "",
        "Technology": "",
        "Comment": "",
        "DueDate": "",
        "ServiceTypeName": "",
        "PhoneNumber": "",
        "LinkedPhoneNumber": "",
        "ServiceTicketCode": "",
        "ServiceTicketCategory": "",
        "TicketCodeID": 0,
        "StructureID": 0,
        "ServingAreaID": 0
    },
    {
        "TicketID": 2985278,
        "CustomerLink": 693041,
        "AssignmentWorkflowStatus": null,
        "AssignmentReturnMessage": "",
        "NetworkDesc": "",
        "LinecardID": null,
        "EnableAuto": false,
        "RequestedSpeed": "",
        "Technology": "",
        "Comment": "",
        "DueDate": "",
        "ServiceTypeName": "",
        "PhoneNumber": "",
        "LinkedPhoneNumber": "",
        "ServiceTicketCode": "",
        "ServiceTicketCategory": "",
        "TicketCodeID": 0,
        "StructureID": 0,
        "ServingAreaID": 0
    },
    {
        "TicketID": 2985278,
        "CustomerLink": 693047,
        "AssignmentWorkflowStatus": null,
        "AssignmentReturnMessage": "",
        "NetworkDesc": "",
        "LinecardID": null,
        "EnableAuto": false,
        "RequestedSpeed": "",
        "Technology": "",
        "Comment": "",
        "DueDate": "",
        "ServiceTypeName": "",
        "PhoneNumber": "",
        "LinkedPhoneNumber": "",
        "ServiceTicketCode": "",
        "ServiceTicketCategory": "",
        "TicketCodeID": 0,
        "StructureID": 0,
        "ServingAreaID": 0
    }
]

Was this article helpful?

Related Articles