Replies: 1 comment 11 replies
-
Hey @Xiddiqui, could you show the code snippet for how you're using custom messages? Are you doing something similar to this:
Would also help if you can share more information on what you mean by break your current implementation. |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello . I need help to delete specific message from chat . I tried customMessages as guided in documentation but it breaks my current implimentation
const flow = {
start: {
message: "Hello! How can I assist you today?",
options: ["Add Client KYC"],
path: (input) => {
if (input.userInput === "Add Client KYC") {
return "form_fill";
} else {
return "loop";
}
},
},
loop: {
message: async (params) => {
const result = await fetchChatBotData(params.userInput);
return result;
},
path: "loop",
},
form_fill: {
message: "Please Fill the form bellow",
render: (
<ChatKycForm
loading={isLoading}
onSubmit={addLead}
onClose={() => setPaths((prev) => [...prev, "start"])}
/>
),
chatDisabled: true,
},
end: {
message: "Thank you! Your Lead created successfully",
options: ["Add Client KYC"],
path: (input) => {
if (input.userInput === "Add Client KYC") {
return "form_fill";
} else {
return "loop";
}
},
},
This is my flow and inside form_fill there is a component inside chatkycform there is button cancel when user press this button the last message from array should be deleted
How can i achive this
Beta Was this translation helpful? Give feedback.
All reactions