Character not using passed in message in Narrative Design

What do you need help with?

Bug report

Issue area

Context Handling

Impact

Major - a core flow is broken

Character ID

ea267828-2987-11f1-9e64-42010a7be02c

Session ID

don’t have it

Where does it happen?

Web SDK / Embed

Short summary

The character is simply saying “Start Message” instead of using the text passed to the API from my session.

Recent character changes

NONE

User message or prompt

The page passes a statement to the character, depending on the scenario being run. It is different for each scenario but the character is failing for every one.

Current response

The character is literally saying “Start Message” rather than having the given text substituted into the utterance.

Expected response

The character should be saying the text supplied from my session page. This was working and is not now - I did not make any changes to the code or the character.

Redacted logs or response

Short summary

The character is simply saying “Start Message” instead of using the text passed to the API from my session. Did something change in Convai?

What are you trying to do?

I pass the initial utterance to the character when starting the session. I use StartMessage as a key and the character is supposed to say this phrase as directed in the Narrative Design.

What happened?

What did you expect?

This was working before and now is not. I have not altered my code for this.

I checked the relevant documentation, resources, and similar forum posts before posting.

on

I confirm that I did not include API keys, tokens, passwords, secrets, private character data, private conversation logs, or customer data.

on

Could you please share the Session ID from the Memory tab so we can review it further?

How are you setting the Narrative Design Template keys in your application?

Could you please share more details about how StartMessage is being passed and mapped on your side?

b6eb7f7dc486efaabc0016bec0689441

User: [SESSION_INIT]
Objection Jack: I appreciate you explaining that. I’m just not sure about committing to something new right now. It feels like a big step. ***THIS WAS NEVER SPOKEN BY THE CHARACTER
User: [An Event has occured]: {StartMessage} Then stop speaking and give the turn back to the User.
Objection Jack: {StartMessage}
***THIS IS THE ISSUE

b2f4047371979cf5b01ff3289a9c3506
Same pattern as above, nothing is uttered by the character until it says “StartMessage”

57609f549ab053f51cb2c3122c92d86a
Same pattern as above, nothing is uttered by the character until it says “StartMessage”

Is this the issue??

The StartMessage key is correctly named, but our current official constructor option is wrong. We are sending:

narrativeTemplateKeys: {
  StartMessage: "...",
  Situation: "..."
}

Convai’s SDK expects:

narrativeTemplateKeysMap: new Map([
  ["StartMessage", "..."],
  ["Situation", "..."]
])

We build the Narrative Design variable as StartMessage and can confirm the character receives the intended text through the session prompt. However, when the Narrative Design trigger fires, Convai logs show the event still contains {StartMessage}, and the character literally says {StartMessage}.

Current web client code passes:
ctorOpts.narrativeTemplateKeys = { StartMessage: “…”, Situation: “…” }

But the Convai web SDK docs/types appear to expect:
narrativeTemplateKeysMap: new Map([[“StartMessage”, “…”], [“Situation”, “…”]])

We are pinned to convai-web-sdk@1.2.0. Can you confirm whether the UMD web SDK supports Narrative Design substitution through narrativeTemplateKeysMap, and whether the map must be passed at client construction, updated before invokeTrigger, or sent another way?

I shared this - please respond

We will check this as soon as possible.

Please note that weekends are not included in our review timeline.

Hi, please use the updated sdk: https://www.npmjs.com/package/@convai/web-sdk
These are the narrative-template usage docs: Dynamic Context | Convai Documentation
The one that you shared is not maintained as of now.