This function will create a new ticket.
New-CWMTicket [[-id] <Int32>] [-summary] <String> [[-recordType] <Object>] [[-board] <Object>] [[-status] <Object>] [[-project] <Object>] [[-phase] <Object>] [[-wbsCode] <String>] [-company] <Object> [[-site] <Object>] [[-siteName] <String>] [[-addressLine1] <String>] [[-addressLine2] <String>] [[-city] <String>] [[-stateIdentifier] <String>] [[-zip] <String>] [[-country] <Object>] [[-contact] <Object>] [[-contactName] <String>] [[-contactPhoneNumber] <String>] [[-contactPhoneExtension]
<String>] [[-contactEmailAddress] <String>] [[-type] <Object>] [[-subType] <Object>] [[-item] <Object>] [[-team] <Object>] [[-owner] <Object>] [[-priority] <Object>] [[-serviceLocation] <Object>] [[-source] <Object>] [[-requiredDate] <String>] [[-budgetHours] <Decimal>] [[-opportunity] <Object>] [[-agreement] <Object>] [[-severity] <Int32>] [[-impact] <Int32>] [[-externalXRef] <String>] [[-poNumber] <String>] [[-knowledgeBaseCategoryId] <Int32>] [[-knowledgeBaseSubCategoryId] <Int32>]
[[-allowAllClientsPortalView] <Boolean>] [[-customerUpdatedFlag] <Boolean>] [[-automaticEmailContactFlag] <Boolean>] [[-automaticEmailResourceFlag] <Boolean>] [[-automaticEmailCcFlag] <Boolean>] [[-automaticEmailCc] <String>] [[-initialDescription] <String>] [[-initialInternalAnalysis] <String>] [[-initialResolution] <String>] [[-contactEmailLookup] <String>] [[-processNotifications] <Boolean>] [[-skipCallback] <Boolean>] [[-closedDate] <String>] [[-closedBy] <String>] [[-closedFlag]
<Boolean>] [[-dateEntered] <String>] [[-enteredBy] <String>] [[-actualHours] <Decimal>] [[-approved] <Boolean>] [[-subBillingMethod] <Object>] [[-subBillingAmount] <Decimal>] [[-subDateAccepted] <String>] [[-dateResolved] <String>] [[-dateResplan] <String>] [[-dateResponded] <String>] [[-resolveMinutes] <Int32>] [[-resPlanMinutes] <Int32>] [[-respondMinutes] <Int32>] [[-isInSla] <Boolean>] [[-knowledgeBaseLinkId] <Int32>] [[-resources] <String>] [[-parentTicketId] <Int32>] [[-hasChildTicket]
<Boolean>] [[-knowledgeBaseLinkType] <Object>] [[-billTime] <Object>] [[-billExpenses] <Object>] [[-billProducts] <Object>] [[-predecessorType] <Object>] [[-predecessorId] <Int32>] [[-predecessorClosedFlag] <Boolean>] [[-lagDays] <Int32>] [[-lagNonworkingDaysFlag] <Boolean>] [[-estimatedStartDate] <String>] [[-duration] <Int32>] [[-locationId] <Int32>] [[-businessUnitId] <Int32>] [[-mobileGuid] <Guid>] [[-sla] <Object>] [[-currency] <Object>] [[-_info] <Object>] [[-customFields] <Object>]
[<CommonParameters>]
Required false
Position 1
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required true
Position 2
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 3
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 4
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 5
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 6
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 7
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 8
Default value
Accept pipeline input false
Accept wildcard characters false
Required true
Position 9
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 10
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 11
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 12
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 13
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 14
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 15
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 16
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 17
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 18
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 19
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 20
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 21
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 22
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 23
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 24
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 25
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 26
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 27
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 28
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 29
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 30
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 31
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 32
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 33
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 34
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 35
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 36
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 37
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 38
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 39
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 40
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 41
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 42
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 43
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 44
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 45
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 46
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 47
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 48
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 49
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 50
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 51
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 52
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 53
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 54
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 55
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 56
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 57
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 58
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 59
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 60
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 61
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 62
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 63
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 64
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 65
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 66
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 67
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 68
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 69
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 70
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 71
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 72
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 73
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 74
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 75
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 76
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 77
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 78
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 79
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 80
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 81
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 82
Default value False
Accept pipeline input false
Accept wildcard characters false
Required false
Position 83
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 84
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 85
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 86
Default value 0
Accept pipeline input false
Accept wildcard characters false
Required false
Position 87
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 88
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 89
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 90
Default value
Accept pipeline input false
Accept wildcard characters false
Required false
Position 91
Default value
Accept pipeline input false
Accept wildcard characters false
PS C:\>$Ticket = @{
'identifier' = $Product.offerName
'description' = $Product.offerName
'subcategory' = @{id = 152}
'type' = @{id = 47}
'customerDescription' = $Product.offerName
'cost' = $Product.unitPrice
'price' = $Price
'manufacturerPartNumber' = $Product.offerName
'manufacturer' = $Manufacturer
'productClass' = 'Agreement'
'taxableFlag' = $true
}
New-CWMTicket @Ticket
Author: Chris Taylor
Date: 8/22/2018
https://developer.connectwise.com/manage/rest?a=Service&e=Tickets&o=CREATE