1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "currentItems": [
12 {
13 "company": "Acme",
14 "faqTopic": "Refunds",
15 "policyText": "30 day refund plus live chat",
16 "commitmentScore": 8
17 },
18 {
19 "company": "Acme",
20 "faqTopic": "Support",
21 "policyText": "24/7 priority support",
22 "commitmentScore": 9
23 }
24 ],
25 "previousItems": [
26 {
27 "company": "Acme",
28 "faqTopic": "Refunds",
29 "policyText": "14 day refund",
30 "commitmentScore": 5
31 },
32 {
33 "company": "Acme",
34 "faqTopic": "Support",
35 "policyText": "business hours support",
36 "commitmentScore": 4
37 }
38 ]
39};
40
41
42const run = await client.actor("quanmatrix/competitor-support-policy-drift-intelligence").call(input);
43
44
45console.log('Results from dataset');
46console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
47const { items } = await client.dataset(run.defaultDatasetId).listItems();
48items.forEach((item) => {
49 console.dir(item);
50});
51
52