Track Event for Contact

Version: 1.0.0
crm/track-contact-event
superface

Track events that are specific for a single contact.

Track Contact Event

Sends an event data to CRM for a specific contact

Contact Identifier
Event Name
Event Properties
Contact Identifier

1. Install

npx @superfaceai/cli install crm/track-contact-event

2. Use in your code

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();

3. Add providers