0.6.0 • Published 5 years ago

@eyedea-sockets/syncano-socket-customer-io v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

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)
0.6.1

5 years ago

0.6.0

5 years ago

0.5.0

5 years ago

0.3.0

5 years ago

0.4.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago