After-send Action Handler

The after-send action handler is used to trigger a workflow after an unfurled link is shared in a conversation. It will be triggered after the unfurled card is posted in chat. Cliq responses such as messages, forms, and banners can be returned as a response. You will get the following attributes when the menu handler is executed.

AttributeDescription
domainDomain which matches the one handled by the extension
urlLink sent by the user
chatDetails of the chat where the link was entered or sent
userDetails of the user who entered or sent the link

Sample code


return {
   "type": "form",
   "title": "Share Page",
   "name": "sharepage",
   "hint": "Share page to the chat participants",
   "button_label": "Share",
   "inputs": [
      {
         "name": "users",
         "label": "Select a user",
         "placeholder": "Choose users from the participants list to share the page with",
         "multiple": true,
         "mandatory": false,
         "type": "native_select",
         "data_source": "contacts"
      }
   ],
   "action": {
      "type": "invoke.function",
      "name": "sharepage"
   }
};