Wizlay

Best Practices

Learn how to effectively use Wizlay in your applications

Security & Performance

Security Best Practices

Essential security measures:

  • Keep API keys secure and rotate them regularly
  • Never expose keys in client-side code
  • Avoid storing sensitive data in public repositories
  • Implement proper authentication checks

Performance Optimization

Optimize your requests by:

  • Maintaining proper conversation context
  • Using appropriate action triggers
  • Implementing efficient error handling
  • Monitoring and optimizing response times

Action Configuration

Kickoff Phrases

Design clear, unique triggers that:

  • Are specific to each action
  • Don't overlap with other triggers
  • Match natural conversation patterns
  • Consider variations in user input

Variable Mapping

For effective data extraction:

  • Use descriptive variable names
  • Map only necessary data points
  • Handle missing or invalid data gracefully

API Response Optimization

Response Structure

Optimize your API responses by:

  • Returning only essential data fields
  • Using consistent response formats
  • Including status codes for error handling
  • Maintaining proper data types

Example Response Format

{
  "status": "success",
  "data": {
    "id": "123",
    "type": "order",
    "attributes": {
      "total": 99.99,
      "currency": "USD"
    }
  },
  "metadata": {
    "timestamp": "2025-03-15T10:30:00Z",
    "requestId": "req_abc123"
  }
}

✓ Clear status indication

✓ Structured data organization

✓ Essential metadata included

Response Best Practices

Follow these guidelines:

  • Use descriptive field names
  • Group related data logically
  • Implement proper error responses

Error Handling

Recommended Practices

1. Monitor request logs regularly to identify issues early

2. Set up webhooks for real-time error notifications

3. Implement proper error handling in your application

4. Test your actions thoroughly before deployment

5. Keep your API endpoints and authentication up to date