Skip to content

Commit

Permalink
update: analytics event data and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DaKingKong committed Aug 28, 2024
1 parent 9ba58fd commit 3060b7e
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 30 deletions.
2 changes: 1 addition & 1 deletion docs/clio.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ And with that, you will be connected to Clio and ready to begin using the integr

Clio's contact lookup method is very strict. As a result, if the phone numbers in Clio are not stored using the E.164 standard, e.g. `+1##########`, then the CRM extension will fail to find the contact record for call logging and call pop.

To address this, short of reformatting every phone number stored in Clio, is to go to [advanced settings](./users/settings.md#advanced-configuration-options) and setting the phone number formats to conform with the conventions used by your practice.
To address this, short of reformatting every phone number stored in Clio, is to go to [Phone number format setting](./users/settings.md#phone-number-formats) under `Contact setting` and setting the phone number formats to conform with the conventions used by your practice.

Navigate to the Unified CRM Chrome extension's advanced settings page and enter in the phone formats used by your practice. Define a format by using an asterix "*" in place of any number. Any other character used in the format string will be interpretted literally.

Expand Down
9 changes: 9 additions & 0 deletions docs/developers/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ An adapter's manifest file helps a developer to instruct the framework on how to

Below you will find an explanation of the many properties found within a manifest file.

## Turn on developer mode

To use a custom manifest, we'll need to turn on developer mode and assign a custom manifest url to the extension. Here's how:

1. Open DevTools
2. In console, execute `window.postMessage({type: 'toggle-developer-mode', toggle: true})` and reload the extension
3. In user settings, there's a section for `Developer settings`. Input your custom manifest url and save
4. Reload the extension to make it work

## Basic properties

These basic properties
Expand Down
Binary file modified docs/img/adv-settings-formats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/img/overriding-format-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/insightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ And with that, you will be connected to Insightly and ready to begin using the i

Insightly's contact lookup method is very strict. As a result, if the phone numbers in Insightly are not stored using the E.164 standard, e.g. `+1##########`, then the CRM extension will fail to find the contact record for call logging and call pop.

To address this, short of reformatting every phone number stored in Insightly, is to go our [advanced settings](./users/settings.md#advanced-configuration-options) and setting the phone number formats to conform with the conventions used by your company.
To address this, short of reformatting every phone number stored in Insightly, is to go our [Phone number format setting](./users/settings.md#phone-number-formats) under `Contact setting` and setting the phone number formats to conform with the conventions used by your company.

Making this change will improve your experience with the extension considerably.
50 changes: 25 additions & 25 deletions docs/users/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,31 @@ Users can directly create placeholder contacts from within the extension so to m
<figcaption>The settings screen for toggling contact creation pop</figcaption>
</figure>

### Phone number formats

In order to match a call to a contact in a CRM, the Unified CRM extension needs to search the CRM for a contact using a phone number. Some CRMs have more rudimentary APIs that require phone numbers to EXACTLY match the string searched for. For these CRMs, reliably finding a contact record for a phone number can be difficult, which in turn impacts your ability to log a call and associate it with the proper entity in your CRM. Let's look at an example to help you understand. The following phone numbers are all functionally equivalent, even though they are not literally identical.

* `(###) ###-####`
* `###.###.####`
* `###-###-####`
* `+1-###-###-####`
* etc

<figure markdown>
![Overriding formats in settings](../img/overriding-format-setup.png){ style="max-width:300px" }
<figcaption>A setting used to search for contacts using a variety of alternative formats used by the customer.</figcaption>
</figure>

RingCentral phone numbers are all formatted using the [E.164 standard](https://en.wikipedia.org/wiki/E.164). If you are not storing phone numbers that utilize this format, and if your particular CRM does not support a more rigorous search mechanism, the Unified CRM extension may fail to associate calls with contacts properly.

This configuration parameter allows you to specify multiple formats used by your team. The Unified CRM extension will then search for contacts using each of the formats provided until a record is found. This may have performance impacts.

CRMs known to exhibit this problem are:

* Clio
* Insightly
* NetSuite

## Automatically prompt to capture call notes

Many end users would like confidence in knowing that every call they place or receive is logged properly in the CRM they are connected to. Furthermore, users also want to be prompted to capture notes about a call immediately upon a call ending. To automatically be prompted to enter and save notes relating to a call that has just ended, enable "Auto log call - only pop up log page" from the Settings page.
Expand Down Expand Up @@ -134,28 +159,3 @@ CRMs known to need this parameter set are:
The Unified CRM extension injects a small handle in the lower right hand corner of your CRM. Some users have expressed concern that this handle obscures the page content, and therefore wish to remove it. Toggle this parameter to turn off/on the dialer handle in the lower-righthand corner.

*Disabling the quick access button does not impact the operability of the extension.*

### Phone number formats

In order to match a call to a contact in a CRM, the Unified CRM extension needs to search the CRM for a contact using a phone number. Some CRMs have more rudimentary APIs that require phone numbers to EXACTLY match the string searched for. For these CRMs, reliably finding a contact record for a phone number can be difficult, which in turn impacts your ability to log a call and associate it with the proper entity in your CRM. Let's look at an example to help you understand. The following phone numbers are all functionally equivalent, even though they are not literally identical.

* `(###) ###-####`
* `###.###.####`
* `###-###-####`
* `+1-###-###-####`
* etc

<figure markdown>
![Overriding formats in settings](../img/overriding-format-setup.png){ style="max-width:300px" }
<figcaption>A setting used to search for contacts using a variety of alternative formats used by the customer.</figcaption>
</figure>

RingCentral phone numbers are all formatted using the [E.164 standard](https://en.wikipedia.org/wiki/E.164). If you are not storing phone numbers that utilize this format, and if your particular CRM does not support a more rigorous search mechanism, the Unified CRM extension may fail to associate calls with contacts properly.

This configuration parameter allows you to specify multiple formats used by your team. The Unified CRM extension will then search for contacts using each of the formats provided until a record is found. This may have performance impacts.

CRMs known to exhibit this problem are:

* Clio
* Insightly
* NetSuite
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ app.get('/contact', async function (req, res) {
const requestStartTime = new Date().getTime();
let platformName = null;
let success = false;
let resultCount = 0;
const { hashedExtensionId, hashedAccountId, userAgent, ip, author } = getAnalyticsVariablesInReqHeaders({ headers: req.headers })
try {
const jwtToken = req.query.jwtToken;
Expand All @@ -312,6 +313,8 @@ app.get('/contact', async function (req, res) {
platformName = platform;
const { successful, returnMessage, contact } = await contactCore.findContact({ platform, userId, phoneNumber: req.query.phoneNumber, overridingFormat: req.query.overridingFormat });
res.status(200).send({ successful, returnMessage, contact });
const nonNewContact = contact.filter(c => !c.isNewContact);
resultCount = nonNewContact.length;
success = true;
}
else {
Expand All @@ -335,7 +338,10 @@ app.get('/contact', async function (req, res) {
requestDuration: (requestEndTime - requestStartTime) / 1000,
userAgent,
ip,
author
author,
extras: {
resultCount
}
});
});
app.post('/contact', async function (req, res) {
Expand Down
5 changes: 3 additions & 2 deletions src/lib/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports.init = function init() {
mixpanel = Mixpanel.init(process.env.MIXPANEL_TOKEN);
}

exports.track = function track({ eventName, interfaceName, adapterName, accountId, extensionId, success, requestDuration, userAgent, ip, author }) {
exports.track = function track({ eventName, interfaceName, adapterName, accountId, extensionId, success, requestDuration, userAgent, ip, author, extras = null }) {
if (!!!mixpanel) {
return;
}
Expand All @@ -38,7 +38,8 @@ exports.track = function track({ eventName, interfaceName, adapterName, accountI
$os: ua.os.name,
$device: ua.device.type,
ip,
author
author,
...extras
});
console.log(`Event: ${eventName}`);
}

0 comments on commit 3060b7e

Please sign in to comment.