0.6.0 • Published 6 years ago
@eyedea-sockets/syncano-socket-customer-io v0.6.0
Syncano Socket for
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 fieldGetting 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 deployUse 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)