# Narrative Design Triggers

## Use of Invoke Narrative Design Trigger in Web.

These triggers would be used to navigate through the story graph and activate specific narrative design sections.

In the example bellow calling the trigger (start tour) would activate "Greet User" section.

<figure><img src="/files/XbrjrdXVtYmxqKduamM4" alt=""><figcaption><p>Narrative Design Trigger</p></figcaption></figure>

Once the logic is decided we can move to our Javascript code. Where we have initialised convaiClient.\
We can call `convaiClient.invokeTrigger()` whenver we require it in our use case.\
Additional information for context can also be passed as the second argument : message.

```javascript
convaiClient = new ConvaiClient({
        apiKey: "", // Replace with your API key
        characterId: "", // Replace with your character ID
        enableAudio: true,
        faceModal: 3,
        enableFacialData: true,
    });

// in the above scenario triggerName = "Start tour."
convaiClient.invokeTrigger("triggerName", "message");
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/narrative-design-guide/narrative-design-triggers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
