AdaSupport / ios-sdk

EmbedFramework is a small iOS SDK that is used to embed the Ada Chat bot into native iOS applications.
MIT License
4 stars 22 forks source link

Disable default chat dialogue #87

Closed Morkrom closed 1 year ago

Morkrom commented 1 year ago

I have a custom "answer id" I wish to display to users. I'm doing it like this,

establishConnectionForChat(inPage: inPage, status: status) host.deleteHistory() host.triggerAnswer(answerId: triggerAnswers.rawValue)

On first try to display an answer ID, the default chat flow is given:

"hi i'm olive", etc

No content of the answer id. Some times it asks for an email when there has been one already configured.

On a second attempt with the same routine listed above, it will show the answer flow. However it does not clear the chat history.

What is the user error here? As an Ada customer, how can I rectify this as soon as possible?

Morkrom commented 1 year ago

Anyway was thrown off by the documentation talking about "trigger answer". Fortunately a peer who guessed ahead of me was able to point that out. You actually set the "greeting" to the 'answer id' at least how it was understaood to me.

You can see also no need to 'reset' most, which I did try.

host.deleteHistory() host.greeting = triggerAnswers.rawValue establishConnectionForChat(inPage: inPage, status: status)