目录

Interaction Model Design

The interaction model of a card ability is classified into the user intent,event trigger andresident event. A user intent is a goal or a task that a user would like to achieve, for example, taking a taxi or checking the weather forecast. An event trigger functions by triggering an ability based on time and location, to satisfy the user intent.Permanent intent cards are applicable to HUAWEI Assistant of Huawei phones. If you need a permanent intent card, just create it, with no need to push events.

1. User Intent

User Intent

[h2]1.1 Concept

A user intent is represented by one or more intents in the interaction model. The intent is the input of user request implementation, and the intent includes the following information:

[h2]1.2 Design

Select an appropriate trigger mode based on the interaction mode provided by an ability.

Interaction Mode

Trigger Mode

A user can use an ability by entering a keyword, for example, today's weather.

Keyword

A user uses an ability by voice, for example, the user asks "What's the weather like today?"

Voice

A user uses an ability through images, for example, using an image of a car to identify the brand of the car.

Image

2. Event Trigger

Concept

An ability is triggered when event conditions (such as time and location) that you have set are met. When an event occurs, HUAWEI Ability Gallery pushes the ability card to users to display event-related information. To add an event, select an event category (Custom eventorPreset event), set the event type, name, description, specify whether to push an event to a specified user, set the duration when the event card will stay visible on the screen, and finally set the display mode.

[h2]2.1 Event Category

Events fall into two categories: custom events and preset events, each of which contains three types.

(1) Custom Event

To add a custom event, you can set its name, trigger rules, and stay duration as needed. The event will then be pushed as configured. Custom events are classified into three types: User reminder, Service entry, and Content recommendation. You can configure one card that you have uploaded for each event to display event-related information. Up to 20 User reminder events are allowed; for Service entry and Content recommendation, the upper limit is 10.

① User reminder event

② Service entry event

③ Content recommendation event

[h2]2.2 Preset Event

The name of a preset event has a fixed prefix, and its trigger rules and stay duration are also fixed. The event will be pushed as preset. Preset events are classified into three types: Account binding guide, Service setting, and Service introduction. At most one preset event can be configured for each type. You can configure one card that you have uploaded for each event to display event-related information. The stay duration has a fixed value of 336 hours.

(1) Account binding card

(2) Service setting card

(3) Service introduction card

[h2]2.3 Event Name

The event name must be carried when your server pushes an event to HUAWEI Ability Gallery. The event name must be unique under the same app ID.

[h2]2.4 Event Description

This is an optional field, which indicates what an event is used for.

[h2]2.5 Whether to Push an Event to a Specified User

If you select Yes, the event will be pushed to a specified user with an account bound; if you select No, the event will be pushed to all users.

[h2]2.6 Stay Duration

This field indicates the duration in which an event card will stay visible on the screen, which is calculated from the event start time.

The event start time is carried in the event notification. If it is not carried in the notification, the stay duration is calculated immediately after the notification is received.

[h2]2.7 Display Mode

This field is mandatory, with a fixed value Custom card. Select a card that you have uploaded to display event-related information.

3. Resident event

resident event cards are applicable to HUAWEI Assistant of Huawei phones. If you need a permanent intent card, just create it, with no need to push events. The card will be always available in HUAWEI Assistant. It is able to redirect user to your app such as a hotel booking app, or recommend quality content to users, such as hot recipes.