Alerts Panel - User Guide
...
Configuring Integrations
WebEngage
7 min
introduction introduction there can be multiple use cases for integrating webengage to alertspanel the ones where event based integrations are needed for instance sending a template when a booking event is done, then we can follow the below instructions connect api trigger url in webengage url to be set sample this has to be set in the following place in webengage build the flow in the particular account, bot, and flow where the integration is needed var whatsappdata = {{whatsappdata}}; var templatedata = whatsappdata templatedata; var templatename = templatedata? templatename; var namespace = '980c3243 2d2a 4d2d a572 b2a50552cb04'; var headertype = templatedata? type; var language = templatedata? language; var mediaurl = templatedata? mediaurl; var buttonurlparam = templatedata? buttonurlparam; var templatevariables = templatedata? templatevariables; var tonumber = whatsappdata? tonumber; var bodyparams = \[]; var headerparams = \[]; var buttonparams = \[]; var headercomponents = {}; var bodycomponents = {}; var buttoncomponents = {}; var components = \[]; // handle header if (\['image', 'video', 'document'] includes(headertype)) { headertype = headertype tolowercase(); headerparams push({ type headertype, \[headertype] { link mediaurl } }); headercomponents\['type'] = 'header'; headercomponents\['parameters'] = headerparams; components push(headercomponents); } // handle body if (templatevariables && templatevariables length > 0) { templatevariables foreach((val) => { bodyparams push({ type 'text', text val }); }); bodycomponents\['type'] = 'body'; bodycomponents\['parameters'] = bodyparams; components push(bodycomponents); } // handle button if (buttonurlparam) { buttonparams push({ type 'text', text buttonurlparam }); buttoncomponents\['type'] = 'button'; buttoncomponents\['sub type'] = 'url'; buttoncomponents\['index'] = 0; buttoncomponents\['parameters'] = buttonparams; components push(buttoncomponents); } // build final template var template = { namespace namespace, name templatename, language { code language, policy 'deterministic' }, components components }; // format phone number if needed if (tonumber\[0] === '+') { tonumber = tonumber substring(1); } // final process call process({ data { type "template", payload template, targetwhatsappnumber tonumber } }); test out the end to end flow from webengage once the above setup is done, we would need a webhook url for the event, we can find it from data platform > integrations > channel integration setup > wa setup > configure > click on “view webhook url” share the following event webhook url also, along with url we will also need auth key provided by webengage if we don’t have it then send a mail to “ support\@webengage com