A boilerplat serverless function and accompanying plugin to integrate Hubspot into the CRMcontainer via IFrame.
It uses the following components:
- a Twilio function that invokes a Hubspot API to fetch a customer record, and returns firstname, lastname and crmid. Can be extended to return more information such as email address or any information returned by Hubspot API.
- Two Studio flows that invoke the function mentioned above and pass the results to flex. One flow is used by incoming calls and the other flow is for incoming conversations (SMS / WhatsApp).
- a Flex plugin that embeds Hubspot within Flex as an Iframe. It will present the contacts page during inactivity or if the caller is not identified or will screen pop the customer record if it is identified using the phone number.
Note: You will need to have at least node --version 18 installed as well as the lates version of Twilio Cli.
Note: If you encounder a compatibility error on install, run the following Twilio plugin update script:
1. Deploy the serverless function, Studio FLOW, connect phone number
2. Download the repo and cd into ... /plugin-hubspot
3. In /public cp appConfig.example.js => appConfig.js
4. Update HubspotPlugins.js (lines 21 & 23) with your HubSpot private app credentials
5. Install dependencies ... npm install
6. Test on local host ... twilio flex:plugins:start
Example when it identifies the caller:
Example during inactivity: