hubtype / botonic

Build chatbots and conversational experiences using React
https://botonic.io
MIT License
519 stars 76 forks source link

plugin-hubtype-analytics: Add target bot_interaction_id on feedback knowledge base events #2877

Closed Iru89 closed 2 months ago

Iru89 commented 2 months ago

Description

@botonic/core Add a new bot_interaction_id attribute in request.input. Add bot_interaction_id in HandoffBuilder.withBotEvent

@botonic/react Be able to store in a Text message the value of botInteractionId. Use the value of botInteractionId when creating a feedback_knowledge_base event

@botonic/plugin-flow-builder When create a Text message using a knowledge base, add the attribute of botInteractionId

@botonic/plugin-hubtype-analytics Add in feedback_knowledge_base event the attribute feedback_target_bot_interaction_id Refactor and split Webviews events in 2 classes and also add optionals attributes

Context

This new attribute is needed in the knowledge base feedback events.

Testing

Fix tests of @botonic/core, @botonic/plugin-flow-builder, @botnic/plugin-flow-builder adding bot_interaction_id in Input tests Add feedback_target_bot_interaction_id in feedback_knowledge_base test