leadconduit-trustedform 1.16.2 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +4 -4
- package/CHANGELOG.md +16 -0
- package/docs/outbound.consent.md +7 -0
- package/docs/outbound.consent_plus_data.md +7 -0
- package/index.js +2 -0
- package/lib/claim.js +4 -19
- package/lib/consent.js +140 -0
- package/lib/consent_plus_data.js +41 -0
- package/lib/data_service.js +2 -2
- package/lib/helpers.js +19 -1
- package/lib/ui/public/app/config/Page1.vue +67 -0
- package/lib/ui/public/app/config/{PageTwo.vue → Page2.vue} +10 -5
- package/lib/ui/public/app/config/{PageThree.vue → Page3.vue} +5 -9
- package/lib/ui/public/app/fieldData.js +1 -1
- package/lib/ui/public/app/router.js +3 -3
- package/lib/ui/public/dist/index.js +1 -1
- package/package.json +2 -1
- package/lib/ui/public/app/config/PageOne.vue +0 -53
- package/lib/ui/public/app/config/components/Navigation.vue +0 -54
|
@@ -9,7 +9,7 @@ on:
|
|
|
9
9
|
default: "patch"
|
|
10
10
|
jobs:
|
|
11
11
|
publish:
|
|
12
|
-
environment: release
|
|
12
|
+
environment: release
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
name: 'Bump version and publish'
|
|
15
15
|
env:
|
|
@@ -18,13 +18,13 @@ jobs:
|
|
|
18
18
|
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
19
19
|
steps:
|
|
20
20
|
- uses: actions/checkout@v2
|
|
21
|
-
with:
|
|
21
|
+
with:
|
|
22
22
|
token: ${{ secrets.GH_TOKEN }}
|
|
23
23
|
- name: Install Node.js
|
|
24
24
|
uses: actions/setup-node@v1
|
|
25
25
|
with:
|
|
26
|
-
node-version: 12
|
|
27
|
-
- name: Install packages
|
|
26
|
+
node-version: ${{ secrets.NODE_VERSION || 12 }}
|
|
27
|
+
- name: Install packages
|
|
28
28
|
run: npm install
|
|
29
29
|
env:
|
|
30
30
|
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org)
|
|
4
4
|
|
|
5
|
+
## [1.17.2] - 2021-12-21
|
|
6
|
+
### Fixed
|
|
7
|
+
- Fixed to use returned `reason` on 40x responses ([sc-33842](https://app.shortcut.com/active-prospect/story/33842/trustedform-consent-consent-data-return-incorrect-reason))
|
|
8
|
+
|
|
9
|
+
## [1.17.1] - 2021-12-10
|
|
10
|
+
### Fixed
|
|
11
|
+
- Fixed to ensure `consent` doesn't append cert data, even when present in the response
|
|
12
|
+
|
|
13
|
+
## [1.17.0] - 2021-12-10
|
|
14
|
+
### Added
|
|
15
|
+
- Added new integrations: [consent](https://app.shortcut.com/active-prospect/story/32490/trustedform-consent-integration) & [consent_plus_data](https://app.shortcut.com/active-prospect/story/32491/trustedform-consent-data-integration)
|
|
16
|
+
|
|
17
|
+
## [1.16.3] - 2021-11-18
|
|
18
|
+
### Fixed
|
|
19
|
+
- Rename Data Service field `masked` to `is_masked` ([sc-32622](https://app.shortcut.com/active-prospect/story/32622/change-trustedform-data-service-integration-to-return-is-masked-instead-of-masked))
|
|
20
|
+
|
|
5
21
|
## [1.16.2] - 2021-11-12
|
|
6
22
|
### Fixed
|
|
7
23
|
- Fixed to report the same reason on 500 server errors it did before TrustedForm's API change ([sc-25816](https://app.shortcut.com/active-prospect/story/25816/lc-trustedform-integration-is-returning-a-different-error-when-encountering-a-500-system-error))
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: TrustedForm Consent + Data
|
|
3
|
+
tag: TCPA
|
|
4
|
+
integration_type: marketplace enhancement
|
|
5
|
+
link: https://activeprospect.com/products/trustedform/
|
|
6
|
+
---
|
|
7
|
+
Store consent in TrustedForm certificates for legal (TCPA) compliance and append associated lead origin data.
|
package/index.js
CHANGED
|
@@ -2,6 +2,8 @@ module.exports = {
|
|
|
2
2
|
ui: require('./lib/ui'),
|
|
3
3
|
outbound: {
|
|
4
4
|
claim: require('./lib/claim'),
|
|
5
|
+
consent: require('./lib/consent'),
|
|
6
|
+
consent_plus_data: require('./lib/consent_plus_data'),
|
|
5
7
|
data_service: require('./lib/data_service'),
|
|
6
8
|
decision_service_ping: require('./lib/data_service'),
|
|
7
9
|
decision_service_post: require('./lib/data_service')
|
package/lib/claim.js
CHANGED
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
const _ = require('lodash');
|
|
2
|
-
const { ageInSeconds, timeOnPageInSeconds, formatScanReason, countRequiredMatched, evalFingerprint,
|
|
2
|
+
const { validate, ageInSeconds, timeOnPageInSeconds, formatScanReason, countRequiredMatched, evalFingerprint, configureClaimOptions } = require('./helpers.js');
|
|
3
3
|
const Client = require('trustedform-api-client');
|
|
4
4
|
|
|
5
5
|
const handle = (vars, callback) => {
|
|
6
|
-
const apiKey =
|
|
6
|
+
const apiKey = _.get(vars, 'trustedform.api_key') ? vars.trustedform.api_key : vars.activeprospect.api_key;
|
|
7
7
|
const client = new Client(apiKey);
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const certUrl = formatUrl(lead.trustedform_cert_url);
|
|
12
|
-
|
|
13
|
-
const host = (process.env.NODE_ENV === 'production') ? 'https://next.leadconduit.com' : 'https://next.leadconduit-staging.com';
|
|
14
|
-
const options = {
|
|
15
|
-
cert_url: certUrl,
|
|
16
|
-
vendor: _.get(vars, 'trustedform.vendor') || vars.source.name,
|
|
17
|
-
reference: trustedform.custom_reference || `${host}/events/${vars.lead.id}`,
|
|
18
|
-
required_text: trustedform.scan_required_text,
|
|
19
|
-
forbidden_text: trustedform.scan_forbidden_text,
|
|
20
|
-
email: lead.email,
|
|
21
|
-
phone_1: lead.phone_1,
|
|
22
|
-
phone_2: lead.phone_2,
|
|
23
|
-
phone_3: lead.phone_3
|
|
24
|
-
};
|
|
8
|
+
|
|
9
|
+
const options = configureClaimOptions(vars.lead, vars.trustedform, vars.source.name);
|
|
25
10
|
|
|
26
11
|
client.claim(options, (err, res, body) => {
|
|
27
12
|
if (err) {
|
package/lib/consent.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
const { get } = require('lodash');
|
|
2
|
+
const { validate, configureClaimOptions, evalFingerprint, countRequiredMatched } = require('./helpers.js');
|
|
3
|
+
const Client = require('trustedform-api-client');
|
|
4
|
+
|
|
5
|
+
const handle = (vars, callback) => {
|
|
6
|
+
const apiKey = get(vars, 'trustedform.api_key') ? vars.trustedform.api_key : vars.activeprospect.api_key;
|
|
7
|
+
const client = new Client(apiKey);
|
|
8
|
+
|
|
9
|
+
const options = configureClaimOptions(vars.lead, vars.trustedform, vars.source.name);
|
|
10
|
+
options.headers = { 'api-version': '3.0' };
|
|
11
|
+
|
|
12
|
+
client.claim(options, (err, res, body) => {
|
|
13
|
+
if (err) {
|
|
14
|
+
const parsed = parseResponse(res.statusCode, body, vars);
|
|
15
|
+
return callback(null, {
|
|
16
|
+
outcome: 'error',
|
|
17
|
+
reason: parsed.reason || err.message
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
callback(null, parseResponse(res.statusCode, body, vars));
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const requestVariables = () => [
|
|
25
|
+
{ name: 'lead.trustedform_cert_url', type: 'string', required: true, description: 'TrustedForm Certificate URL' },
|
|
26
|
+
{ name: 'trustedform.scan_required_text', type: 'array', required: false, description: 'Required text to search snapshot for' },
|
|
27
|
+
{ name: 'trustedform.scan_forbidden_text', type: 'array', required: false, description: 'Forbidden text to search snapshot for' },
|
|
28
|
+
{ name: 'trustedform.vendor', type: 'string', required: false, description: 'Lead vendor name sent to TrustedForm, defaults to the lead source name' },
|
|
29
|
+
{ name: 'trustedform.api_key', type: 'credential', required: false, description: 'Optional TrustedForm API key. Used for claiming certs that belong to another account' },
|
|
30
|
+
{ name: 'trustedform.custom_reference', type: 'string', required: false, description: 'Optional reference, defaults to the lead\'s url' },
|
|
31
|
+
{ name: 'lead.email', type: 'string', required: false, description: 'Lead email that will be fingerprinted, defaults to the lead\'s "Email" field' },
|
|
32
|
+
{ name: 'lead.phone_1', type: 'string', required: false, description: 'Lead phone 1 that will be fingerprinted, defaults to the lead\'s "Phone 1" field' },
|
|
33
|
+
{ name: 'lead.phone_2', type: 'string', required: false, description: 'Lead phone 2 that will be fingerprinted, defaults to the lead\'s "Phone 2" field' },
|
|
34
|
+
{ name: 'lead.phone_3', type: 'string', required: false, description: 'Lead phone 3 that will be fingerprinted, defaults to the lead\'s "Phone 3" field' }
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
// this data should only be present on "consent_plus_data" responses
|
|
38
|
+
const parseCertData = (cert) => {
|
|
39
|
+
return {
|
|
40
|
+
age_in_seconds: cert.age_seconds,
|
|
41
|
+
city: get(cert, 'approx_ip_geo.city'),
|
|
42
|
+
country_code: get(cert, 'approx_ip_geo.country_code'),
|
|
43
|
+
latitude: get(cert, 'approx_ip_geo.lat'),
|
|
44
|
+
longitude: get(cert, 'approx_ip_geo.lon'),
|
|
45
|
+
postal_code: get(cert, 'approx_ip_geo.postal_code'),
|
|
46
|
+
state: get(cert, 'approx_ip_geo.state'),
|
|
47
|
+
time_zone: get(cert, 'approx_ip_geo.time_zone'),
|
|
48
|
+
browser: get(cert, 'browser.full'),
|
|
49
|
+
is_mobile: cert.mobile,
|
|
50
|
+
os: get(cert, 'operating_system.full'),
|
|
51
|
+
token: cert.cert_id,
|
|
52
|
+
time_on_page_in_seconds: Number.isInteger(cert.event_duration_ms) ? cert.event_duration_ms / 1000 : null,
|
|
53
|
+
created_at: cert.created_at,
|
|
54
|
+
expires_at: cert.expires_at,
|
|
55
|
+
form_input_method: cert.form_input_method,
|
|
56
|
+
is_framed: cert.framed,
|
|
57
|
+
ip: cert.ip,
|
|
58
|
+
kpm: cert.kpm,
|
|
59
|
+
wpm: cert.wpm,
|
|
60
|
+
page_url: cert.page_url,
|
|
61
|
+
parent_page_url: cert.parent_page_url,
|
|
62
|
+
domain: null
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const parseResponse = (statusCode, body, vars) => {
|
|
67
|
+
let appended = {};
|
|
68
|
+
const event = body;
|
|
69
|
+
|
|
70
|
+
if (statusCode === 201) {
|
|
71
|
+
appended = {
|
|
72
|
+
outcome: event.outcome || 'success',
|
|
73
|
+
reason: event.reason || null,
|
|
74
|
+
is_masked: event.masked,
|
|
75
|
+
masked_cert_url: event.masked_cert_url,
|
|
76
|
+
warnings: event.warnings
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
Object.assign(appended, evalFingerprint(vars.lead, event.fingerprints));
|
|
80
|
+
|
|
81
|
+
if (get(event, 'scans.forbidden_found')) appended.forbidden_scans_found = get(event, 'scans.forbidden_found');
|
|
82
|
+
if (get(event, 'scans.forbidden_not_found')) appended.forbidden_scans_not_found = get(event, 'scans.forbidden_not_found');
|
|
83
|
+
if (get(event, 'scans.required_found')) appended.required_scans_found = get(event, 'scans.required_found');
|
|
84
|
+
if (get(event, 'scans.required_not_found')) appended.required_scans_not_found = get(event, 'scans.required_not_found');
|
|
85
|
+
|
|
86
|
+
if (get(vars, 'trustedform.scan_required_text')) {
|
|
87
|
+
// 'all', 'some', or 'none'
|
|
88
|
+
appended.num_required_matched = countRequiredMatched(get(vars, 'trustedform.scan_required_text'), appended.required_scans_found);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// cert data should only exist on 'consent_plus_data' responses, but only
|
|
92
|
+
// use it if the plusData flag set by that integration is set
|
|
93
|
+
if (vars.plusData && event.cert && Object.keys(event.cert).length > 0) {
|
|
94
|
+
Object.assign(appended, parseCertData(event.cert));
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
// handle all non-201 statuses
|
|
98
|
+
let errorMessage = get(event, 'errors.detail');
|
|
99
|
+
if (errorMessage === 'Unauthorized' || event.outcome === 'failure') {
|
|
100
|
+
appended.outcome = 'failure';
|
|
101
|
+
} else {
|
|
102
|
+
appended.outcome = 'error';
|
|
103
|
+
// 410 errors do not return a message, so one is added below
|
|
104
|
+
if (statusCode === 410) {
|
|
105
|
+
errorMessage = 'The TrustedForm certificate already passed the 72-hour origination timeframe and can no longer be claimed.';
|
|
106
|
+
} else if (event && event.message) {
|
|
107
|
+
errorMessage = event.message;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
appended.reason = errorMessage ? `TrustedForm error - ${errorMessage} (${statusCode})` : event.reason;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
return appended;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const responseVariables = () => [
|
|
117
|
+
{ name: 'outcome', type: 'string', description: 'certificate claim result' },
|
|
118
|
+
{ name: 'reason', type: 'string', description: 'in case of failure, the reason for failure' },
|
|
119
|
+
{ name: 'masked_cert_url', type: 'string', description: 'The certificate url that masks the lead source url and snapshot' },
|
|
120
|
+
{ name: 'is_masked', type: 'boolean', description: 'Whether the cert is masked' },
|
|
121
|
+
{ name: 'required_scans_found', type: 'array', description: 'List of required scan terms found' },
|
|
122
|
+
{ name: 'required_scans_not_found', type: 'array', description: 'List of required scan terms not found' },
|
|
123
|
+
{ name: 'num_required_matched', type: 'string', description: 'How many of the required strings were scanned? (all, some, none)' },
|
|
124
|
+
{ name: 'forbidden_scans_found', type: 'array', description: 'List of forbidden scan terms found' },
|
|
125
|
+
{ name: 'forbidden_scans_not_found', type: 'array', description: 'List of forbidden scan terms not found' },
|
|
126
|
+
{ name: 'fingerprints_summary', type: 'string', description: 'Summary of fingerprint matching, one of All Matched, Some Matched, None Matched, or No Fingerprinting Data' },
|
|
127
|
+
{ name: 'email_fingerprint_matched', type: 'boolean', description: 'True if the fingerprint of the email matched' },
|
|
128
|
+
{ name: 'phone_1_fingerprint_matched', type: 'boolean', description: 'True if the fingerprint of phone_1 matched' },
|
|
129
|
+
{ name: 'phone_2_fingerprint_matched', type: 'boolean', description: 'True if the fingerprint of phone_2 matched' },
|
|
130
|
+
{ name: 'phone_3_fingerprint_matched', type: 'boolean', description: 'True if the fingerprint of phone_3 matched' },
|
|
131
|
+
{ name: 'warnings', type: 'array', description: 'Any warnings returned by the claim' }
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
module.exports = {
|
|
135
|
+
validate,
|
|
136
|
+
handle,
|
|
137
|
+
parseResponse,
|
|
138
|
+
requestVariables,
|
|
139
|
+
responseVariables
|
|
140
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const consent = require('./consent');
|
|
2
|
+
|
|
3
|
+
const handle = (vars, callback) => {
|
|
4
|
+
vars.plusData = true;
|
|
5
|
+
consent.handle(vars, callback);
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const responseVariables = () => {
|
|
9
|
+
return consent.responseVariables().concat([
|
|
10
|
+
{ name: 'age_in_seconds', type: 'number', description: 'Number of seconds since the certificate was created' },
|
|
11
|
+
{ name: 'city', type: 'string', description: 'City name based on IP address' },
|
|
12
|
+
{ name: 'country_code', type: 'string', description: 'Country based on IP address' },
|
|
13
|
+
{ name: 'latitude', type: 'number', description: 'Latitude based on IP address' },
|
|
14
|
+
{ name: 'longitude', type: 'number', description: 'Longitude based on IP address' },
|
|
15
|
+
{ name: 'postal_code', type: 'string', description: 'Mailing address postal code based on IP address' },
|
|
16
|
+
{ name: 'state', type: 'string', description: 'State or province name based on IP address' },
|
|
17
|
+
{ name: 'time_zone', type: 'string', description: 'Time zone name based on IP address' },
|
|
18
|
+
{ name: 'browser', type: 'string', description: 'Human friendly version of user-agent' },
|
|
19
|
+
{ name: 'is_mobile', type: 'boolean', description: 'True if the user device is a mobile device' },
|
|
20
|
+
{ name: 'os', type: 'string', description: 'Human friendly version of the users operating system' },
|
|
21
|
+
{ name: 'token', type: 'string', description: 'The TrustedForm certificate token' },
|
|
22
|
+
{ name: 'time_on_page_in_seconds', type: 'number', description: 'Number of seconds the consumer spent filling out the offer form' },
|
|
23
|
+
{ name: 'created_at', type: 'time', description: 'Time the user loaded the form in UTC ISO8601 format' },
|
|
24
|
+
{ name: 'expires_at', type: 'time', description: 'Time the cert would have expired if not claimed' },
|
|
25
|
+
{ name: 'form_input_method', type: 'array', description: 'The input method or methods the consumer used to fill out the form: autofill, paste, typing' },
|
|
26
|
+
{ name: 'is_framed', type: 'boolean', description: 'True if the page_url was in an iframe' },
|
|
27
|
+
{ name: 'ip', type: 'string', description: 'Consumer\'s IP address' },
|
|
28
|
+
{ name: 'kpm', type: 'number', description: 'Consumer\'s typing speed on the form, in keystrokes per minute' },
|
|
29
|
+
{ name: 'wpm', type: 'number', description: 'Consumer\'s typing speed on the form, in words per minute' },
|
|
30
|
+
{ name: 'page_url', type: 'string', description: 'The URL of the page hosting the TrustedForm script ' },
|
|
31
|
+
{ name: 'parent_page_url', type: 'string', description: 'The parent frame URL when the page is framed ' }
|
|
32
|
+
]);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
module.exports = {
|
|
36
|
+
validate: consent.validate,
|
|
37
|
+
handle,
|
|
38
|
+
parseResponse: consent.parseResponse,
|
|
39
|
+
requestVariables: consent.requestVariables,
|
|
40
|
+
responseVariables
|
|
41
|
+
};
|
package/lib/data_service.js
CHANGED
|
@@ -96,7 +96,7 @@ const response = (vars, req, res) => {
|
|
|
96
96
|
user_agent: cert.user_agent,
|
|
97
97
|
fingerprints_matching: get(event, 'fingerprints.matching'),
|
|
98
98
|
fingerprints_non_matching: get(event, 'fingerprints.non_matching'),
|
|
99
|
-
|
|
99
|
+
is_masked: event.masked,
|
|
100
100
|
scans_found: found,
|
|
101
101
|
scans_not_found: notFound,
|
|
102
102
|
warnings: event.warnings
|
|
@@ -154,7 +154,7 @@ response.variables = () => [
|
|
|
154
154
|
{ name: 'data_service.user_agent', type: 'string', description: 'The browser and operating system for the device on which the consumer filled out the form' },
|
|
155
155
|
{ name: 'data_service.fingerprints_matching', type: 'array', description: 'Matching fingerprints that were found on the TrustedForm certificate' },
|
|
156
156
|
{ name: 'data_service.fingerprints_non_matching', type: 'array', description: 'Non-matching fingerprints that were found on the TrustedForm certificate' },
|
|
157
|
-
{ name: 'data_service.
|
|
157
|
+
{ name: 'data_service.is_masked', type: 'boolean', description: 'Whether or not the TrustedForm certificate is masked' },
|
|
158
158
|
{ name: 'data_service.scans_found', type: 'array', description: 'Language that was found through the use of page scanning' },
|
|
159
159
|
{ name: 'data_service.scans_not_found', type: 'array', description: 'Language that was not found through the use of page scanning' },
|
|
160
160
|
{ name: 'data_service.warnings', type: 'array', description: 'Any warnings present about the content of the form, specific to page scanning and fingerprinting' }
|
package/lib/helpers.js
CHANGED
|
@@ -38,7 +38,7 @@ const countRequiredMatched = (requiredStrings, scans) => {
|
|
|
38
38
|
return (requiredStringNotFound) ? 'some' : 'all';
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const evalFingerprint = (lead, fingerprints) => {
|
|
41
|
+
const evalFingerprint = (lead, fingerprints = { matching: [], non_matching: [] }) => {
|
|
42
42
|
const result = {};
|
|
43
43
|
|
|
44
44
|
if (fingerprints.matching.length) {
|
|
@@ -89,6 +89,23 @@ const validate = (vars) => {
|
|
|
89
89
|
if (!productionValid && !stagingValid) return 'TrustedForm cert URL must be valid';
|
|
90
90
|
};
|
|
91
91
|
|
|
92
|
+
const configureClaimOptions = (lead, trustedform = {}, sourceName) => {
|
|
93
|
+
const certUrl = formatUrl(lead.trustedform_cert_url);
|
|
94
|
+
|
|
95
|
+
const host = (process.env.NODE_ENV === 'production') ? 'https://app.leadconduit.com' : 'https://app.leadconduit-staging.com';
|
|
96
|
+
return {
|
|
97
|
+
cert_url: certUrl,
|
|
98
|
+
vendor: _.get(trustedform, 'vendor') || sourceName,
|
|
99
|
+
reference: trustedform.custom_reference || `${host}/events/${lead.id}`,
|
|
100
|
+
required_text: trustedform.scan_required_text,
|
|
101
|
+
forbidden_text: trustedform.scan_forbidden_text,
|
|
102
|
+
email: lead.email,
|
|
103
|
+
phone_1: lead.phone_1,
|
|
104
|
+
phone_2: lead.phone_2,
|
|
105
|
+
phone_3: lead.phone_3
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
92
109
|
module.exports = {
|
|
93
110
|
ageInSeconds,
|
|
94
111
|
timeOnPageInSeconds,
|
|
@@ -96,5 +113,6 @@ module.exports = {
|
|
|
96
113
|
countRequiredMatched,
|
|
97
114
|
evalFingerprint,
|
|
98
115
|
formatUrl,
|
|
116
|
+
configureClaimOptions,
|
|
99
117
|
validate
|
|
100
118
|
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<header>
|
|
4
|
+
Set Up TrustedForm {{ moduleName }}
|
|
5
|
+
</header>
|
|
6
|
+
<div v-if="isDataService">
|
|
7
|
+
<section>
|
|
8
|
+
<p>
|
|
9
|
+
TrustedForm Data Service provides lead buyers with optimized lead data that helps them assess the value of a
|
|
10
|
+
lead. It helps buyers identify the leads that are most likely to convert and effectively manage returns and
|
|
11
|
+
rejections. At the time of purchase, or any time thereafter, the lead buyer can use the LeadConduit platform
|
|
12
|
+
to access lead metadata (not PII) found in the TrustedForm certificates.
|
|
13
|
+
</p>
|
|
14
|
+
<p>
|
|
15
|
+
<b>Note:</b> To access TrustedForm Data Service data, your lead source must use the TrustedForm script on
|
|
16
|
+
their lead forms.
|
|
17
|
+
</p>
|
|
18
|
+
</section>
|
|
19
|
+
<Navigation :onNext="onNext"/>
|
|
20
|
+
</div>
|
|
21
|
+
<div v-else-if="!isDataService">
|
|
22
|
+
<LoadingScreen :module-name="'TrustedForm ' + moduleName"/>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import { LoadingScreen, Navigation } from '@activeprospect/integration-components';
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
data () {
|
|
32
|
+
return {
|
|
33
|
+
isDataService: true
|
|
34
|
+
};
|
|
35
|
+
},
|
|
36
|
+
components: {
|
|
37
|
+
LoadingScreen, Navigation
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
moduleName () {
|
|
41
|
+
switch (this.$store.state.config.integration) {
|
|
42
|
+
case 'leadconduit-trustedform.outbound.claim':
|
|
43
|
+
return 'Claim';
|
|
44
|
+
case 'leadconduit-trustedform.outbound.consent':
|
|
45
|
+
return 'Consent';
|
|
46
|
+
case 'leadconduit-trustedform.outbound.consent_plus_data':
|
|
47
|
+
return 'Consent + Data';
|
|
48
|
+
case 'leadconduit-trustedform.outbound.data_service':
|
|
49
|
+
return 'Data Service';
|
|
50
|
+
default:
|
|
51
|
+
return '';
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
onNext () {
|
|
57
|
+
this.$router.push('/2');
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
mounted () {
|
|
61
|
+
const { integration } = this.$store.state.config;
|
|
62
|
+
if (!integration.includes('data_service')) {
|
|
63
|
+
this.isDataService = false;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
</script>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</thead>
|
|
17
17
|
<tbody>
|
|
18
18
|
<tr
|
|
19
|
-
v-for="(value, key
|
|
19
|
+
v-for="(value, key) in fields"
|
|
20
20
|
:key="key"
|
|
21
21
|
>
|
|
22
22
|
<td>{{ key }}</td>
|
|
@@ -27,21 +27,26 @@
|
|
|
27
27
|
</table>
|
|
28
28
|
</div>
|
|
29
29
|
</section>
|
|
30
|
-
<Navigation/>
|
|
30
|
+
<Navigation :onNext="onNext"/>
|
|
31
31
|
</div>
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script>
|
|
35
|
-
import Navigation from '
|
|
35
|
+
import { Navigation } from '@activeprospect/integration-components';
|
|
36
36
|
|
|
37
37
|
export default {
|
|
38
|
-
data() {
|
|
38
|
+
data () {
|
|
39
39
|
return {
|
|
40
|
-
fields: this.$store.state.fieldData
|
|
40
|
+
fields: this.$store.state.fieldData
|
|
41
41
|
};
|
|
42
42
|
},
|
|
43
43
|
components: {
|
|
44
44
|
Navigation
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
onNext () {
|
|
48
|
+
this.$router.push('/3');
|
|
49
|
+
}
|
|
45
50
|
}
|
|
46
51
|
};
|
|
47
52
|
</script>
|
|
@@ -8,25 +8,21 @@
|
|
|
8
8
|
Now you’re ready to map your fields and set up the associated filters in your LeadConduit flow.
|
|
9
9
|
</p>
|
|
10
10
|
</section>
|
|
11
|
-
<Navigation :
|
|
12
|
-
<template v-slot:footer>
|
|
13
|
-
<button @click="finish" class="primary">Finish</button>
|
|
14
|
-
</template>
|
|
15
|
-
</Navigation>
|
|
11
|
+
<Navigation :onFinish="finish"/>
|
|
16
12
|
</div>
|
|
17
13
|
</template>
|
|
18
14
|
|
|
19
15
|
<script>
|
|
20
|
-
import Navigation from '
|
|
16
|
+
import { Navigation } from '@activeprospect/integration-components';
|
|
21
17
|
|
|
22
18
|
export default {
|
|
23
19
|
methods: {
|
|
24
|
-
finish() {
|
|
20
|
+
finish () {
|
|
25
21
|
this.$store.dispatch('finish');
|
|
26
|
-
}
|
|
22
|
+
}
|
|
27
23
|
},
|
|
28
24
|
components: {
|
|
29
25
|
Navigation
|
|
30
|
-
}
|
|
26
|
+
}
|
|
31
27
|
};
|
|
32
28
|
</script>
|
|
@@ -95,7 +95,7 @@ module.exports = {
|
|
|
95
95
|
description: 'Non-matching fingerprints that were found on the TrustedForm certificate.',
|
|
96
96
|
use: 'Reject a lead where there is not a fingerprint match.'
|
|
97
97
|
},
|
|
98
|
-
|
|
98
|
+
is_masked: {
|
|
99
99
|
description: 'Whether or not the TrustedForm certificate is masked.',
|
|
100
100
|
use: 'Route leads with masked certificates to a different system.'
|
|
101
101
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Vue from 'vue';
|
|
2
2
|
import Router from 'vue-router';
|
|
3
3
|
import Config from './config/Config.vue';
|
|
4
|
-
import PageOne from './config/
|
|
5
|
-
import PageTwo from './config/
|
|
6
|
-
import PageThree from './config/
|
|
4
|
+
import PageOne from './config/Page1.vue';
|
|
5
|
+
import PageTwo from './config/Page2.vue';
|
|
6
|
+
import PageThree from './config/Page3.vue';
|
|
7
7
|
|
|
8
8
|
Vue.use(Router);
|
|
9
9
|
|