raiseTicket()
Ticket raiseTicket(string templateTicketNumber, string usn, NewTicketRequest newTicketRequest)
This method creates a ticket and starts a workflow. This method also has the ability to schedule an operator appointment. The workflow to start and the ticket fields to complete are defined in the ticket template.
Before you use this method, configure the workflow and ticket template in Smile.
Parameters
- templateTicketNumber
- Format: string
- usn
- Format: string
- newTicketRequest
- Format: NewTicketRequest XML
Example: Create a ticket
This example creates a ticket. The ticket fields to complete are defined in the ticket template.
<NewTicketRequest xmlns="http://xml.inomial.com/smile/2.xsd">
<Properties>
<Object>
<String name="Plan">14.95</String>
<Date name="AuthDate">2011-11-25</Date>
<Date name="DateofBirth">1984-05-20</Date>
<String name="DriversLicence">09123823</String>
<Boolean name="PortExistingNumber">false</Boolean>
<String name="Company">Example</String>
<String name="ContactFamilyName">Smith</String>
<String name="ContactGivenName">Joe</String>
<String name="EmailAddress">joe@example.com</String>
<String name="HomePhone">+61355501256</String>
<String name="WorkPhone">0491570156</String>
<String name="StreetName">Simpson</String>
<String name="StreetNumber">60</String>
<String name="Postcode">2000</String>
<String name="Suburb">Sydney</String>
<String name="FullNationalNumber">0491570156</String>
<String name="State">NSW</String>
<String name="StreetType">ESP</String>
</Object>
</Properties>
</NewTicketRequest>
Example: Create a ticket to close a subscription
This example creates a ticket to close a subscription. The ticket fields to complete are defined in the ticket template.
<NewTicketRequest xmlns="http://xml.inomial.com/smile/2.xsd">
<Properties>
<Object>
<Reference name="subscription">2142423645</Reference>
<Date name="closeDate">2011-11-28</Date>
<String name="closeReason">Customer is moving to the US.</String>
</Object>
</Properties>
</NewTicketRequest>
Example: Create an appointment
This example creates a 60 minute appointment with operator 2142422464, starting at midnight September 25, 2013.
<NewTicketRequest xmlns="http://xml.inomial.com/smile/2.xsd">
<Properties</>
<Subject>New Ticket Subject (customBody)</Subject>
<Body/>
<AppointmentRequest>
<USN>2142422464</USN>
<Start>2013-09-25T00:00:00+11:00</Start>
<Duration>600000</Duration>
<TravelDuration>0</TravelDuration>
</AppointmentRequest>
</NewTicketRequest>
Results
This method creates a ticket and returns a Ticket XML document with the ticket number for the new ticket. The method also starts the workflow defined in the ticket template.
There are no messages defined by this method.
Example: A returned Ticket XML document
This example shows a Ticket XML document returned by the previous example. Note that the document contains the ticket number for the new ticket.
<Ticket xmlns="http://xml.inomial.com/smile/2.xsd">
<Number>184213</Number>
<Subject>Close subscription 2142423645</Subject>
</Ticket>
Faults
CrmExceptionThis fault is returned when the ticket cannot be created or the caller does not have permission to raise a ticket.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.RaiseTicket templateTicketNumber usn filename
- templateTicketNumber
- Purpose: Specifies the template to use to create the ticket.
- usn
- Purpose: Specifies the USN of the account or subscription to raise the ticket against.
- filename
- Purpose: Defines the filename of the NewTicketRequest XML document.