echoing-piano-74951
08/04/2025, 9:09 PMminiature-solstice-74815
08/04/2025, 8:40 PMmammoth-lifeguard-63559
08/04/2025, 6:51 PMbrave-laptop-80534
08/04/2025, 6:16 PMfresh-monkey-1901
08/04/2025, 5:01 PMacceptable-army-56496
08/04/2025, 3:46 PMadventurous-umbrella-74657
08/04/2025, 3:14 PMcuddly-balloon-49892
08/04/2025, 11:48 AMclever-baker-85732
08/04/2025, 9:26 AMquiet-park-29806
08/04/2025, 12:32 AMadventurous-umbrella-74657
08/03/2025, 1:49 PMloud-potato-3483
08/03/2025, 10:28 AMmammoth-lifeguard-63559
08/02/2025, 5:15 AMnarrow-planet-91101
08/02/2025, 5:09 AMgorgeous-lighter-70657
08/01/2025, 7:13 PMlemon-school-83014
08/01/2025, 4:44 PMsquare-king-46874
08/01/2025, 4:31 PMalert-dress-55119
08/01/2025, 3:28 PMbillions-umbrella-47692
08/01/2025, 2:36 PMswift-parrot-35378
08/01/2025, 9:23 AMmicroscopic-stone-6467
08/01/2025, 8:38 AMjs
const result = await bp.dialogEngine.invokeAction('your-action-name', { inputVar: value }, event)
when I use them in hooks, looks bp is undefined. Please let me know how can I use the functions defined in actions in hooks to reuse the functions
https://cdn.discordapp.com/attachments/1400759446891925645/1400759447089053777/Screenshot_2025-08-01_at_14.06.35.png?ex=688dce65&is=688c7ce5&hm=d11f9d9b335c6c09dce1f8a85f90d72a2005a4ebd02ea4735625d0b37fa6e6d5&mammoth-lifeguard-63559
08/01/2025, 3:23 AMbillowy-florist-75135
08/01/2025, 3:20 AMmammoth-lifeguard-63559
08/01/2025, 3:19 AMorange-memory-1465
08/01/2025, 12:33 AMbillions-pilot-44782
08/01/2025, 12:11 AM<Webchat
clientId="28a344bb-2566-496b-b137-45f6684b413d"
configuration={{
botId: "91a6841c-24c3-4f08-8794-11b77358aff8",
version: "v1",
// ... other config properties
userData: {
company: company,
person: person
}
}}
/>
**
Key Implementation Points:**
Method: Using userData field in the Webchat configuration object
Data Format: Flat key-value pairs ({company: string, person: string})
Data Types: Both fields are strings
Timing: Data is passed during component initialization
Data Validation:
TypeScript interface ensures type safety:
interface BotpressChatProps {
company: string;
person: string;
}
**
Previous Attempted Methods (That Failed):**
ā user field in configuration
ā initialPayload field in configuration
ā Nested object structures like user.leadInformationhallowed-branch-68168
07/31/2025, 6:29 PMadventurous-umbrella-74657
07/31/2025, 5:48 PMmammoth-lifeguard-63559
07/31/2025, 2:40 PMrhythmic-car-15540
07/31/2025, 11:35 AM