# Case: Booking Train Tickets

The case "Movie Query" introduces the basic usage of "Robot Dynamic Question." This case will demonstrate how to use the "Robot Dynamic Question" reply type in combination with the platform capabilities of questioning, API call, rich text reply.

# Effect display

booktickets

In the case of booking a train ticket, we break down the task into the following steps:

  1. Know the origin and destination of the user (by building slots and asking)

  2. Show the user the number, time and fare for the user to choose (show the list of trips through dynamic questions)

  3. Configure the corresponding reply for the ride selected by the user (configure the corresponding robot reply by filling in the path information)

# Step 1: Create Intent and Speech

First of all, let's create a skill-intention-what you want the user to hit (we explained how to configure it in the previous introduction, not more here).

# Step 2: Select or customize the API

Select the reply type as "Service Interface Call" and select the "Train Ticket Reservation Service" API here. The input parameters for this API include "departure" and "visual" - that is, if the API is successfully invoked, the user needs to provide the departure and visual information. booktickets

# Step 3: Build the tank and set up the inquiry

According to the parameters required by the API, create slots in the semantic slots settings and set the query talk. booktickets

Associate slots at the API interface configuration.

# Step 4: Select the "Robot Dynamic Reply" type and set the display mode

Special Identifier:[ ] One or more slot information can be filled in in the middle, and the function of this special marker is to list and click on the slot information in it. Between the two $numbers is the slot to be output, and the slot to be exported to $. As shown in the figure, the problem will be shown as "from Departure time ticket price destination Arrival time at destination” , the results returned by the API will be presented to the user in the form of a list and allow the user to click.

booktickets

# Step 5: Configure the path information for the next robot response

As in this example, the user will pull the Mini Program after clicking the train number. Fill in the Mini Program information according to the corresponding requirements, and the way to obtain the Mini Program information is explained in the section of the document [Create Answer-Direct Reply]. booktickets Path information can be associated with slots, which developers can match on demand based on their own services. As in this example, you can link the slot in the Mini Program path to the output parameter corresponding to the train that the user clicked. After this setting is completed, the Mini Program replied by the system will automatically be positioned to the booking page of the train.