AdvancedIntegrations

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.

AI
Messaging
E-Commerce
Valuation
Hardware

Available Integrations

Artificial Intelligence

Google Gemini

API key from Google AI Studio

AI

Enable AI-powered features including:

Intelligent item descriptions
Image analysis & categorization
Value estimation assistance
Smart search & recommendations

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

OAuth
List items directly from inventory
Update stock levels automatically
Track sold items
Import purchase history

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

Customizable QR codes
Label format templates
Batch generation
Print configuration

Setting Up Integrations

The integration screen displays available integrations grouped by category, their connection status, and quick access to configuration.

Step 01

Select Integration

Navigate to Settings → Integrations and tap on the integration you want to configure.

Step 02

Enter Credentials

A configuration sheet will appear requesting API keys, tokens, or service-specific settings.

integrations_provider.dart:78
Future<Map<String, dynamic>?> getConfig(String type) async {
return await _service.getIntegrationConfig(type);
}
Step 03

Test Connection

Use the test button to verify connectivity before saving:

integrations_provider.dart:37
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;
}
}
Step 04

Save Configuration

Once the test succeeds, save the integration. A green checkmark will appear indicating it’s active.

integrations_provider.dart:83
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

2. Create a new API key or use an existing one
3. Copy the key
4. Paste it into the Gemini integration in Invenicum
5. Test the connection to verify

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

1

Create Bot

  • Search @BotFather on Telegram
  • Send /newbot
  • Follow the naming prompts
  • Receive your bot token
2

Configure Alerts

  • Choose trigger events
  • Set alert frequency
  • Define message templates
  • Set target chat IDs
3

Start Bot

  • Send a message to your bot
  • This activates the chat
  • Enable notifications in Invenicum

Email Integration (Resend)

Resend Setup

1. Sign up at Resend.com
2. Create an API key in the dashboard
3. Verify your sending domain (or use Resend’s test domain)
4. Configure sender email address
5. Add the API key to Invenicum

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

integrations_service.dart:10 — testIntegration
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

integrations_service.dart:38
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:

1

Generate Webhook URL

Generate a unique URL for your account in the config

2

Configure External Service

Paste the URL into the external service's webhook settings

3

Select Events

Choose which events trigger the webhook

4

Verify Delivery

Use the test webhook feature to ensure events arrive

Event Types

Item createdItem updatedItem deletedValue changedStock threshold crossed

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:

Step 01

Initiate OAuth

Click "Connect with OAuth" in the integration configuration.

Step 02

Authorize Access

You'll be redirected to the service's authorization page. Log in and grant permissions.

Step 03

Callback Processing

After authorization, you'll be redirected back to Invenicum. The integration automatically completes setup.

Step 04

Token Refresh

OAuth tokens are automatically refreshed when needed. No re-authorization unless you revoke access.

Managing Integrations

Unlinking an Integration

1. Open the integration configuration
2. Select “Disconnect” or “Unlink”
3. Confirm the action
4. Integration status updates to inactive
integrations_provider.dart:60
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

1. Open the integration (even if already linked)
2. Modify configuration values
3. Test the new configuration
4. Save to apply changes

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

Integration type identifiers
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.