Integrations & Automations
Complete guide to integrating AI Product Tools with third-party plugins, automation systems, and custom workflows
AI Product Tools seamlessly integrates with popular WordPress plugins and external services to create powerful automated workflows. This guide covers all supported integrations and advanced automation strategies.
WordPress Plugin Integrations
SEO Plugins
Yoast SEO Integration
Full Compatibility Features:
- Automatic meta description sync
- Focus keyword integration
- SEO analysis integration
- Content optimization suggestions
- Readability scoring compatibility
Setup Process:
-
Enable Integration
- Go to AI Product Tools → Settings → SEO Settings
- Enable "Yoast SEO Integration"
- Configure meta description sync options
-
Meta Description Sync
- Generated short descriptions automatically sync to Yoast meta descriptions
- Custom meta description templates supported
- Automatic length optimization (155-160 characters)
-
Focus Keyword Integration
Prompt Variable: {focus_keyword} Usage: "Write a description for {product_name} targeting the keyword {focus_keyword}"
Advanced Configuration:
- Automatic Updates: Sync generated content to Yoast fields
- SEO Score Integration: Consider Yoast SEO scores in generation
- Bulk Meta Updates: Update meta descriptions for multiple products
- Template Customization: Custom templates for different product types
RankMath SEO Integration
RankMath Features:
- Primary keyword integration
- Meta description automation
- Schema markup compatibility
- Content analysis integration
- SEO scoring integration
Configuration Steps:
-
Enable RankMath Support
- Activate in plugin settings
- Map AI-generated content to RankMath fields
- Configure automatic updates
-
Schema Integration
- Product schema enhancement
- Review schema automation
- FAQ schema generation
-
Keyword Optimization
- Primary keyword variable mapping
- LSI keyword integration
- Keyword density optimization
All in One SEO (AIOSEO)
Supported Features:
- Meta description sync
- Open Graph descriptions
- Twitter card descriptions
- Local SEO integration
Setup Configuration:
// Custom integration hook example
add_action('aipt_content_generated', function($product_id, $content) {
update_post_meta($product_id, '_aioseo_description', $content['short_description']);
});
Custom Fields Plugins
Advanced Custom Fields (ACF)
ACF Integration Benefits:
- Map any ACF field to generation variables
- Support for all ACF field types
- Conditional field integration
- Repeater field support
- Flexible content integration
Field Mapping Process:
-
Identify ACF Fields
- Navigate to Custom Fields section in plugin settings
- View available ACF fields for products
- Select fields for variable mapping
-
Create Variable Mappings
ACF Field: product_material → Variable: {material} ACF Field: care_instructions → Variable: {care} ACF Field: brand_story → Variable: {brand_story}
-
Advanced Template Usage
"This {product_name} is made from premium {material}. {brand_story} Care instructions: {care}"
Supported ACF Field Types:
- Text fields
- Textarea fields
- Select fields
- Checkbox fields
- Image fields (alt text integration)
- Repeater fields (comma-separated values)
- Flexible content (first block content)
Custom Fields Suite (CFS)
Integration Features:
- Field value mapping
- Loop field support
- Relationship field integration
- Date field formatting
Toolset Types
Compatibility:
- Custom field integration
- Post relationship fields
- User field integration
- Conditional display support
Page Builder Integrations
Elementor
Elementor Integration:
- Product widget compatibility
- Dynamic content support
- Template integration
- Custom field display
Setup Process:
-
Widget Compatibility
- AI-generated content works with all Elementor product widgets
- Dynamic tag support for custom fields
- Template library integration
-
Custom Templates
- Create Elementor templates using AI-generated content
- Dynamic product description widgets
- Conditional content display
Beaver Builder
Features:
- Product module compatibility
- Custom field modules
- Template integration
- Responsive design support
Divi Builder
Integration Points:
- Product module support
- Dynamic content integration
- Custom CSS compatibility
- Template system integration
WooCommerce Extensions
WooCommerce Multilingual (WPML)
Multilingual Workflow:
- Generate content in multiple languages
- Automatic translation integration
- Language-specific prompts
- Cultural adaptation support
Implementation Strategy:
-
Language-Specific Generation
English Prompt: "Create a professional product description..." Spanish Prompt: "Crea una descripción profesional del producto..." French Prompt: "Créez une description professionnelle du produit..."
-
Cultural Adaptation
- Region-specific messaging
- Cultural preference integration
- Local market terminology
- Currency and measurement unit adaptation
-
Bulk Multilingual Processing
- Generate for primary language first
- Translate and adapt for other languages
- Maintain consistency across languages
- Cultural review process
WooCommerce Subscriptions
Integration Features:
- Subscription-specific language
- Billing cycle descriptions
- Renewal messaging
- Subscription benefit highlighting
WooCommerce Memberships
Features:
- Member-exclusive language
- Access level descriptions
- Benefit highlighting
- Community messaging
Email Marketing Integrations
Mailchimp Integration
Email Marketing Enhancement:
- Product description sync to email campaigns
- Automated product announcement emails
- Personalized product recommendations
- Dynamic content insertion
Setup Process:
-
API Configuration
- Connect Mailchimp account
- Map product fields to Mailchimp merge tags
- Configure sync settings
-
Campaign Automation
- New product announcements
- Back-in-stock notifications
- Personalized recommendations
- Seasonal campaign content
Klaviyo Integration
Features:
- Product feed synchronization
- Dynamic content blocks
- Personalization variables
- Automated flows
ConvertKit Integration
Capabilities:
- Subscriber tagging based on interests
- Product-specific sequences
- Content personalization
- Automated product updates
API and Webhook Integrations
REST API Integration
API Capabilities:
- Generate content via API calls
- Bulk processing endpoints
- Status monitoring endpoints
- Webhook notifications
- Custom integration development
Authentication Setup
// API Key Authentication
$headers = [
'Authorization' => 'Bearer ' . $api_key,
'Content-Type' => 'application/json'
];
Available Endpoints
Generation Endpoints:
POST /wp-json/aipt/v1/generate/single
POST /wp-json/aipt/v1/generate/bulk
GET /wp-json/aipt/v1/status/{job_id}
Management Endpoints:
GET /wp-json/aipt/v1/history
GET /wp-json/aipt/v1/credits
POST /wp-json/aipt/v1/settings
Example API Usage
// Generate content for single product
const response = await fetch('/wp-json/aipt/v1/generate/single', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
product_id: 123,
content_types: ['short_description', 'description'],
settings: {
language: 'en',
style: 'professional'
}
})
});
Webhook Notifications
Supported Events
Webhook Events:
generation.started
- Bulk generation beginsgeneration.completed
- Generation finishedgeneration.failed
- Generation encountered errorproduct.updated
- Product content updatedcredits.low
- Credit balance below threshold
Webhook Configuration
// Add webhook endpoint
add_action('aipt_generation_completed', function($data) {
wp_remote_post('https://your-app.com/webhook', [
'body' => json_encode($data),
'headers' => ['Content-Type' => 'application/json']
]);
});
Webhook Payload Example
{
"event": "generation.completed",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"job_id": "abc123",
"products_processed": 50,
"success_count": 48,
"failure_count": 2,
"credits_used": 150
}
}
Automation Platforms
Zapier Integration
Zapier Automation:
- Trigger content generation from external events
- Connect with 5000+ apps
- Multi-step automation workflows
- Conditional logic support
Popular Zap Templates
New Product Automation:
- Trigger: New product added to Shopify/WooCommerce
- Action: Generate AI content via API
- Action: Update product descriptions
- Action: Send notification to team
Inventory Automation:
- Trigger: Product back in stock
- Action: Generate updated description
- Action: Send to email list
- Action: Post to social media
Content Review Workflow:
- Trigger: Content generation completed
- Action: Create task in project management tool
- Action: Send review request to team
- Action: Schedule content approval
Setup Process
-
Connect Accounts
- Connect your WordPress site to Zapier
- Authenticate AI Product Tools API
- Connect other required apps
-
Create Zap
- Choose trigger (new product, webhook, etc.)
- Configure AI Product Tools action
- Add additional actions as needed
-
Test and Activate
- Test the complete workflow
- Monitor for errors
- Activate automation
Microsoft Power Automate
Integration Capabilities:
- Office 365 integration
- SharePoint document workflows
- Teams notifications
- Excel data processing
Example Flow
- Trigger: New row in Excel (product list)
- Action: Call AI Product Tools API
- Action: Update SharePoint list
- Action: Send Teams notification
IFTTT Integration
Simple Automations:
- Social media posting
- Email notifications
- Calendar events
- File management
Custom Development Integrations
WordPress Hooks and Filters
Developer Hooks:
- Customize generation behavior
- Add custom variables
- Modify content before/after generation
- Integrate with custom systems
Available Hooks
Action Hooks:
// Before generation starts
do_action('aipt_before_generation', $product_id, $settings);
// After generation completes
do_action('aipt_after_generation', $product_id, $content);
// Before content is applied
do_action('aipt_before_apply', $product_id, $content);
Filter Hooks:
// Modify prompt before sending to AI
$prompt = apply_filters('aipt_modify_prompt', $prompt, $product_id);
// Modify generated content
$content = apply_filters('aipt_modify_content', $content, $product_id);
// Add custom variables
$variables = apply_filters('aipt_custom_variables', $variables, $product_id);
Custom Integration Examples
Custom Variable Integration:
add_filter('aipt_custom_variables', function($variables, $product_id) {
$product = wc_get_product($product_id);
// Add custom variable for supplier info
$variables['supplier'] = get_post_meta($product_id, '_supplier_name', true);
// Add custom variable for eco-rating
$variables['eco_rating'] = get_post_meta($product_id, '_eco_rating', true);
return $variables;
}, 10, 2);
Content Modification:
add_filter('aipt_modify_content', function($content, $product_id) {
// Add custom footer to all descriptions
$content['description'] .= "\n\n" . get_option('company_description_footer');
// Add shipping info for heavy items
$product = wc_get_product($product_id);
if ($product->get_weight() > 10) {
$content['description'] .= "\n\nNote: Special shipping applies to this item.";
}
return $content;
}, 10, 2);
Database Integration
Custom Tables
Log Generation History:
// Create custom table for detailed logging
$wpdb->query("
CREATE TABLE IF NOT EXISTS {$wpdb->prefix}aipt_generation_log (
id int(11) AUTO_INCREMENT,
product_id int(11),
content_type varchar(50),
model_used varchar(50),
tokens_used int(11),
generation_time float,
created_at datetime,
PRIMARY KEY (id)
)
");
Analytics Integration
Track Performance Metrics:
add_action('aipt_after_generation', function($product_id, $content) {
// Track generation metrics
$metrics = [
'product_id' => $product_id,
'content_length' => strlen($content['description']),
'readability_score' => calculate_readability($content['description']),
'seo_score' => calculate_seo_score($content['description']),
'generation_time' => get_transient('aipt_generation_time_' . $product_id)
];
// Save to analytics table
save_generation_metrics($metrics);
});
Monitoring and Analytics
Performance Tracking
Key Metrics to Monitor:
- Generation success rates
- Content quality scores
- API response times
- Credit usage patterns
- Error frequencies
Built-in Analytics
Dashboard Metrics:
- Total generations this month
- Success/failure rates
- Average generation time
- Credit usage trends
- Popular generation types
Custom Analytics Setup
Google Analytics Integration:
// Track generation events
gtag('event', 'content_generated', {
'event_category': 'ai_product_tools',
'event_label': 'bulk_generation',
'value': products_count
});
Custom Metrics Dashboard:
// Create custom admin dashboard widget
add_action('wp_dashboard_setup', function() {
wp_add_dashboard_widget(
'aipt_metrics',
'AI Product Tools Metrics',
'display_aipt_metrics'
);
});
Error Monitoring
Error Tracking Setup
Sentry Integration:
// Track generation errors
add_action('aipt_generation_error', function($error, $product_id) {
if (function_exists('sentry_capture_exception')) {
sentry_capture_exception($error, [
'extra' => ['product_id' => $product_id]
]);
}
});
Custom Error Logging:
// Enhanced error logging
add_action('aipt_generation_error', function($error, $context) {
error_log(sprintf(
'AIPT Error: %s | Product: %d | Context: %s',
$error->getMessage(),
$context['product_id'],
json_encode($context)
));
});
Best Practices for Integrations
Security Considerations
Security Guidelines:
- Always validate API inputs
- Use proper authentication
- Sanitize generated content
- Implement rate limiting
- Monitor for unusual activity
API Security
// Implement proper API authentication
add_action('rest_api_init', function() {
register_rest_route('aipt/v1', '/secure-endpoint', [
'methods' => 'POST',
'callback' => 'handle_secure_request',
'permission_callback' => function() {
return current_user_can('manage_woocommerce');
}
]);
});
Performance Optimization
Caching Strategies
Content Caching:
// Cache generated content
add_action('aipt_after_generation', function($product_id, $content) {
wp_cache_set(
'aipt_content_' . $product_id,
$content,
'aipt_cache',
HOUR_IN_SECONDS
);
});
API Response Caching:
// Cache API responses
$cache_key = 'aipt_api_' . md5($prompt);
$cached_response = wp_cache_get($cache_key, 'aipt_api');
if (false === $cached_response) {
$response = call_ai_api($prompt);
wp_cache_set($cache_key, $response, 'aipt_api', 300);
} else {
$response = $cached_response;
}
Database Optimization
Efficient Queries:
// Optimize bulk operations
$products = get_posts([
'post_type' => 'product',
'posts_per_page' => 50,
'meta_query' => [
[
'key' => '_aipt_generated',
'compare' => 'NOT EXISTS'
]
],
'fields' => 'ids' // Only get IDs to save memory
]);
Related Topics
API Documentation
Complete API reference and examples
Custom Variables
Learn about custom field integration
Workflows
Practical implementation strategies
Best Practices
Optimization and security guidelines