ADVANCED
Integrations
Connect Invenicum with external services and APIs for AI features, messaging, e-commerce sync, and real-time valuation data.
Overview
Invenicum integrations allow you to connect your inventory system with external services for enhanced functionality, automation, and data synchronization — from AI-powered descriptions to e-commerce listing and barcode lookups.
Available Integrations
Artificial Intelligence
Google Gemini
API key from Google AI Studio
Enable AI-powered features including:
Messaging & Notifications
Telegram Bot
Token from @BotFather
- Low stock alerts
- New item additions
- Value changes
- Custom triggers
Email (Resend)
Resend API key
- Scheduled reports
- Transaction confirmations
- Sharing collections
- Export deliveries
E-Commerce & Marketplaces
eBay Connector
eBay Developer credentials + OAuth
Valuation Tools
PriceCharting
PriceCharting API key
- Historical price trends
- Current market values
- Loose vs. complete pricing
- Regional variations
UPCitemdb
UPCitemdb API key
- Product info by UPC/EAN
- Price comparison data
- Product specifications
- Alternative identifiers
Hardware & Labels
QR Code Generator
Label size and format preferences
Setting Up Integrations
The integration screen displays available integrations grouped by category, their connection status, and quick access to configuration.
Select Integration
Navigate to Settings → Integrations and tap on the integration you want to configure.
Enter Credentials
A configuration sheet will appear requesting API keys, tokens, or service-specific settings.
Future<Map<String, dynamic>?> getConfig(String type) async {
return await _service.getIntegrationConfig(type);
}Test Connection
Use the test button to verify connectivity before saving:
Future<bool> testConnection(String type, Map<String, dynamic> config) async {
_isTesting = true;
_lastErrorMessage = "";
notifyListeners();
try {
final result = await _service.testIntegration(type, config);
if (result['success'] == true) {
return true;
} else {
_lastErrorMessage = result['message'] ?? "Unknown error";
return false;
}
} catch (e) {
_lastErrorMessage = "Server error";
return false;
}
}Save Configuration
Once the test succeeds, save the integration. A green checkmark will appear indicating it’s active.
Future<bool> saveIntegration(String type, Map<String, dynamic> config) async {
try {
await _service.saveIntegration(type, config);
_statuses[type] = true; // Optimistic update
notifyListeners();
return true;
} catch (e) {
return false;
}
}Integration Details
Google Gemini Setup
Obtaining API Key
Features Enabled
- Smart Descriptions — generate item descriptions from images
- Categorization — auto-suggest categories and tags
- Value Estimation — AI-assisted price recommendations
- Search Enhancement — natural language queries
Telegram Bot Configuration
Create Bot
- Search @BotFather on Telegram
- Send
/newbot - Follow the naming prompts
- Receive your bot token
Configure Alerts
- Choose trigger events
- Set alert frequency
- Define message templates
- Set target chat IDs
Start Bot
- Send a message to your bot
- This activates the chat
- Enable notifications in Invenicum
Email Integration (Resend)
Resend Setup
Email Features
- Reports — schedule daily, weekly, or monthly inventory reports
- Alerts — receive notifications for threshold events
- Sharing — email collection summaries to collaborators
- Exports — receive CSV/Excel exports via email
API Integrations
Future<Map<String, dynamic>> testIntegration(
String type,
Map<String, dynamic> config,
) async {
try {
final response = await _dio.post(
'/integrations/test',
data: {'type': type, 'config': config},
);
return response.data;
} on DioException catch (e) {
return {
'success': false,
'message': e.response?.data['message'] ?? 'Connection error',
};
}
}Integration Status Check
Future<Map<String, bool>> getIntegrationStatuses() async {
final response = await _dio.get('/integrations/status');
final Map<String, dynamic> rawMap = response.data['data'];
return rawMap.map((key, value) => MapEntry(key, value as bool));
}Status is displayed with visual indicators on the integrations screen.
Setting Up Webhooks
Some integrations support webhooks for real-time event notifications:
Generate Webhook URL
Generate a unique URL for your account in the config
Configure External Service
Paste the URL into the external service's webhook settings
Select Events
Choose which events trigger the webhook
Verify Delivery
Use the test webhook feature to ensure events arrive
Event Types
Webhooks are processed asynchronously for system performance — there may be a slight delay between event and delivery.
OAuth Flows
Some integrations like eBay require OAuth authentication:
Initiate OAuth
Click "Connect with OAuth" in the integration configuration.
Authorize Access
You'll be redirected to the service's authorization page. Log in and grant permissions.
Callback Processing
After authorization, you'll be redirected back to Invenicum. The integration automatically completes setup.
Token Refresh
OAuth tokens are automatically refreshed when needed. No re-authorization unless you revoke access.
Managing Integrations
Unlinking an Integration
Future<bool> unlinkIntegration(String type) async {
try {
await _service.deleteIntegration(type);
_statuses[type] = false;
notifyListeners();
return true;
} catch (e) {
debugPrint("Error unlinking: $e");
return false;
}
}Reconfiguring Integrations
Changing API keys immediately affects all features using that integration. Test thoroughly before saving.
Best Practices
Security
- Store API keys securely — never share them
- Use environment-specific keys for testing
- Regularly rotate credentials
- Review integration permissions periodically
- Revoke access for unused integrations
Performance
- Enable only integrations you actively use
- Monitor API rate limits carefully
- Use webhooks instead of polling when available
- Cache integration responses when appropriate
Reliability
- Test integrations after configuration changes
- Set up monitoring for critical integrations
- Have fallback plans for service outages
- Keep integration documentation handy
Troubleshooting
Connection Test Failed
Possible Causes
- Invalid API key or credentials
- Network connectivity issues
- Service is temporarily down
- Incorrect configuration format
Solutions
- Verify credentials are correct and active
- Check your internet connection
- Review the service’s status page
- Consult integration-specific documentation
Integration Works Intermittently
Possible Causes
- Rate limiting by the external service
- Token expiration (OAuth)
- Network instability
Solutions
- Check rate limits in service documentation
- Re-authorize OAuth integrations
- Monitor network stability
- Contact support if issues persist
Webhook Not Receiving Events
Possible Causes
- Incorrect webhook URL
- Event type not configured
- Webhook disabled in external service
- Firewall blocking requests
Solutions
- Verify webhook URL is correct
- Check event config on both sides
- Ensure webhook is enabled in service
- Review firewall and security settings
Integration Constants
static const String gemini = 'gemini'; static const String telegram = 'telegram'; static const String email = 'email'; static const String ebay = 'ebay'; static const String priceCharting = 'priceCharting'; static const String upcitemdb = 'upcitemdb'; static const String qrLabels = 'qrLabels';
Reference these IDs when working with the integration API programmatically.
Next Steps