Sends an event data to CRM for a specific contact
npx @superfaceai/cli install crm/track-contact-event
const { SuperfaceClient } = require('@superfaceai/one-sdk');
const sdk = new SuperfaceClient();
async function run() {
// Load the installed profile
const profile = await sdk.getProfile('crm/track-contact-event');
// Use the profile
const result = await profile
.getUseCase('TrackContactEvent')
.perform({
contactId: 'example.user@email.com',
eventName: 'order-created',
eventProperties: {
orderId: 'nYRe6bt97oLrH4g5Ssak6',
totalAmount: '42',
currency: 'EUR'
}
});
return result.unwrap();
}
run();
Switching providers Learn how to use automatic failover or switch between providers manually.
Missing your favorite provider? Tell us which provider you'd like to use.