1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "rfqTexts": [
12 "Hello,\nwe need a quotation for the following material for a small workshop fit-out.\nNo item numbers on our side, sorry - descriptions only.\n- 320 m installation cable NYM-J 5G2.5 mm2 grey\n- 45 pcs surface Schuko socket 16A IP44 grey\n- 30 pcs surface switch 1-pole 10A IP44 grey\n- 8 pcs residual current device 63A 4-pole 30mA type A\n- 16 pcs miniature circuit breaker B16\n- 12 pcs wall enclosure IP66 600x400x200 grey\n- 200 pcs cable gland M20 IP68 plastic grey\n- 60 m single core H07V-K 1x10 mm2 black\n- 5 pcs current transformer 100/5A class 1\n- 20 pcs LED panel 600x600 30W 4000K UGR19\n- 90 pcs terminal block screw 4mm2 grey\n- 3 pcs cable drum trolley, steel, 400mm\nBest regards\nRita Hollenbach"
13 ],
14 "catalogueCsv": `code,description,unit,unit_price_eur,manufacturer
15CBL-NYY-J-5G2.5,"Power cable NYY-J 5G2.5 mm² black",m,3.85,Lapp
16CBL-NYY-J-5G4,"Power cable NYY-J 5G4 mm² black",m,5.90,Lapp
17CBL-NYY-J-3G1.5,"Power cable NYY-J 3G1.5 mm² black",m,1.72,Lapp
18CBL-NYM-J-3G1.5,"Installation cable NYM-J 3G1.5 mm² grey",m,1.05,Lapp
19CBL-NYM-J-5G2.5,"Installation cable NYM-J 5G2.5 mm² grey",m,2.68,Lapp
20CBL-H07V-K-1X6,"Single core H07V-K 1x6 mm² green/yellow",m,1.24,Helukabel
21CBL-H07V-K-1X10,"Single core H07V-K 1x10 mm² black",m,2.05,Helukabel
22MCB-B16-1P,"Miniature circuit breaker B16 1-pole 6kA",pc,6.40,Hager
23MCB-B16-3P,"Miniature circuit breaker B16 3-pole 6kA",pc,19.80,Hager
24MCB-C16-1P,"Miniature circuit breaker C16 1-pole 6kA",pc,6.95,Hager
25MCB-B10-1P,"Miniature circuit breaker B10 1-pole 6kA",pc,6.20,Hager
26MCB-B32-3P,"Miniature circuit breaker B32 3-pole 6kA",pc,23.40,Hager
27RCD-40-2P-30,"Residual current device 40A 2-pole 30mA type A",pc,48.50,Hager
28RCD-40-4P-30,"Residual current device 40A 4-pole 30mA type A",pc,76.20,Hager
29RCD-63-4P-30,"Residual current device 63A 4-pole 30mA type A",pc,98.40,Hager
30CON-9A-230,"Contactor 9A 3-pole coil 230VAC 1NO",pc,28.90,Schneider
31CON-12A-230,"Contactor 12A 3-pole coil 230VAC 1NO",pc,34.10,Schneider
32CON-18A-230,"Contactor 18A 3-pole coil 230VAC 1NO",pc,46.70,Schneider
33CON-25A-24,"Contactor 25A 3-pole coil 24VDC 1NO",pc,61.30,Schneider
34OLR-6-10,"Thermal overload relay 6-10A",pc,32.80,Schneider
35OLR-9-13,"Thermal overload relay 9-13A",pc,34.50,Schneider
36ENC-IP65-300,"Wall enclosure IP65 300x200x150 grey",pc,42.00,Rittal
37ENC-IP65-400,"Wall enclosure IP65 400x300x200 grey",pc,64.50,Rittal
38ENC-IP66-600,"Wall enclosure IP66 600x400x200 grey",pc,118.00,Rittal
39DIN-RAIL-35,"DIN rail TS35 perforated 2m",pc,4.60,Rittal
40TB-2.5-GY,"Terminal block screw 2.5mm² grey",pc,0.62,Phoenix
41TB-4-GY,"Terminal block screw 4mm² grey",pc,0.88,Phoenix
42TB-2.5-BU,"Terminal block screw 2.5mm² blue",pc,0.66,Phoenix
43CGL-M20,"Cable gland M20 IP68 plastic grey",pc,0.74,Lapp
44CGL-M25,"Cable gland M25 IP68 plastic grey",pc,0.95,Lapp
45CGL-M32,"Cable gland M32 IP68 plastic grey",pc,1.48,Lapp
46SOC-CEE-16-5P,"CEE socket 16A 5-pole 400V IP44 surface",pc,14.20,Mennekes
47SOC-CEE-32-5P,"CEE socket 32A 5-pole 400V IP44 surface",pc,26.80,Mennekes
48PLG-CEE-16-5P,"CEE plug 16A 5-pole 400V IP44",pc,11.90,Mennekes
49LED-PAN-600-40,"LED panel 600x600 40W 4000K UGR19",pc,38.90,Ledvance
50LED-PAN-600-30,"LED panel 600x600 30W 4000K UGR19",pc,34.20,Ledvance
51LED-BAT-1500-50,"LED batten 1500mm 50W 4000K IP65",pc,29.60,Ledvance
52SW-1P-IP44,"Surface switch 1-pole 10A IP44 grey",pc,5.30,Gira
53SOC-SCHUKO-IP44,"Surface Schuko socket 16A IP44 grey",pc,6.80,Gira
54PSU-24-5,"DIN rail power supply 24VDC 5A 120W",pc,74.50,Mean Well
55PSU-24-10,"DIN rail power supply 24VDC 10A 240W",pc,118.00,Mean Well
56SPD-T2-4P,"Surge protection device type 2 4-pole",pc,89.00,Dehn
57CT-100-5,"Current transformer 100/5A class 1",pc,21.40,Janitza
58ML-CU-12X2,"Copper busbar 12x2mm 1m",pc,9.80,Rittal`
59};
60
61
62const run = await client.actor("ksoffice/rfq-to-quote-matcher").call(input);
63
64
65console.log('Results from dataset');
66console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
67const { items } = await client.dataset(run.defaultDatasetId).listItems();
68items.forEach((item) => {
69 console.dir(item);
70});
71
72