Skip to content

eyedea-io/syncano-socket-customer-io

Repository files navigation

Syncano Socket for

Syncano Socket CircleCI branch Codecov branch JavaScript Style Guide npm license

Main Socket features:

customer-io/anonymous-event — Send anonymous event

  • Params
    • event: string - Event name (required)
    • data: object - Additional data sent over with the event (required)

customer-io/customer-event — Send customer event

  • Params
    • customerId: string - Unique user id
    • email: string - Customer email
    • event: string - Event name (required)
    • data: object - Additional data sent over with the event

customer-io/customer — add/update customer

  • Params
    • customerId: string - Unique user id
    • email: string - Customer email (required)
    • attributes: object - description: Custom attributes to define the customer

customer-io/delete-customers — Remove customer

  • Params
    • customerId: string - Unique user id (required)

customer-io/migrate — Remove customer

  • Params
    • migrationKey: string - Migration key to authorise database operation (required)

Config:

  SITE_ID - customer.io siteId
  API_KEY = customer.io apiKey
  CUSTOMERIO_MIGRATION_KEY = your passphrase migration key to migrate usernames to customer.io id database field

Getting Started

Install package in your project:

cd my_project
npm install @syncano/cli --save-dev
npm install @eyedea-sockets/syncano-socket-customer-io --save
npx s deploy

Use it:

import Syncano from '@syncano/client'

const s = new Syncano(<instaneName>)

// Search for a user
const params = {
  event: 'recover_password',
  data: {
    'email': 'test@email.com',
  }
}

const suggestions = await s.get('customer-io/anonymous-event', params)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published