Creating ATP Notifications
After registering your service, the next step is to create and send notifications. ATP provides a flexible notification system that supports various levels of complexity, from simple yes/no prompts to rich, structured data collection.Notification Anatomy
An ATP notification consists of several key components:- Basic Information - Title, description, and priority
- Actions - Possible user responses with associated response types
- Metadata - Additional context for your application
- Expiration - Optional timeout for time-sensitive notifications
Basic Notifications
Let’s start with a simple notification that requires a basic yes/no response:Python
JavaScript/Node.js
Rich Notifications
ATP supports rich response types that allow collecting structured data from users:Text Input
Collect free-form text from users:Multiple Choice
Offer users predefined options to choose from:Form Data
Collect structured data with multiple fields:JSON Schema
For complex data collection with validation, use JSON Schema:Action Types
ATP supports different action types that determine what happens when a user responds:Simple Actions
Simple actions require only a single click with no additional data:Data Collection Actions
These actions require additional information from the user:Multi-step Actions
For more complex interactions, you can chain notifications based on initial responses:Response Types Reference
ATP supports several response types to collect different kinds of data:Type | Description | Response Data |
---|---|---|
simple | Basic acknowledgment | No additional data |
text | Free-form text input | String value |
select | Choose from options | Selected value(s) |
form | Structured data with multiple fields | Object with field values |
json | Complex structured data validated against JSON schema | JSON object |
file | File upload | File metadata and content |
Simple Response Type
Text Response Type
Select Response Type
Form Response Type
JSON Response Type
Notification Constraints
When creating notifications, be aware of these constraints:Limits
- Title: Maximum 100 characters
- Description: Maximum 1000 characters
- Actions: Between 1 and 5 actions per notification
- Action Labels: Maximum 50 characters
- Priority Levels: “low”, “normal”, “high”, or “urgent”
Best Practices
- Keep notifications concise - Use clear, direct language
- Provide sufficient context - Ensure users understand why they’re being asked to respond
- Limit the number of actions - Fewer choices lead to faster decisions
- Use appropriate priority levels - Reserve “high” and “urgent” for time-sensitive notifications
- Include helpful metadata - Store relevant context for later processing
Example: Well-designed Notification
Notification Metadata
Metadata allows you to include additional context with your notifications. This data will be returned with the response, helping you correlate responses with the original context:Notification Expiration
For time-sensitive notifications, you can set an expiration time:- It will no longer be displayed to users
- Any pending responses will be rejected
- You can optionally receive a webhook notification of the expiration
Testing Your Notifications
Before sending notifications to real users, it’s a good practice to test them thoroughly:Using the Test Environment
Simulating Responses
The ATP SDK provides test utilities for simulating user responses:Notification Design Best Practices
To create effective notifications that respect user attention:- Be clear and specific - Provide enough context for informed decisions
- Use appropriate priority - Don’t overuse high priority
- Group related notifications - Avoid notification fatigue
- Respect privacy - Don’t include sensitive information in titles/descriptions
- Set reasonable expirations - Match expiration time to urgency
- Provide actionable options - Make action labels clear and specific
- Include fallback options - Add “Cancel” or “Later” options when appropriate
Poor vs. Good Examples
❌ Poor NotificationVerification: Knowledge Check
Before proceeding, let’s verify your understanding of notification creation: If you understand these concepts, you’re ready to start creating effective notifications for your users.Next Steps
Now that you know how to create notifications, the next step is learning how to process the responses you receive from users.Processing Responses
Learn how to handle and process user responses to your notifications