HookRetry

Agency Guide: API Ingestion Buffer Pro

1. Configuration profiles

A profile is a small, named, versioned JSON file that sets the buffer's policy on a store. You keep one file per policy in your own repository and apply it to every store, instead of clicking through settings screens.

{
  "schema": "wcaib-profile",
  "schema_version": "2.0",
  "profile": { "name": "Agency standard", "revision": 3, "description": "Default for retail clients" },
  "policy": {
    "processing": { "batch_size": 90, "max_attempts": 5, "direct_sql": false },
    "retention":  { "completed_days": 14, "dead_letter_days": 60 },
    "guard":      { "supersede_stale": true, "price_change_percent": 40, "stock_change_percent": 60 },
    "replay":     { "items_per_minute": 50, "stop_failure_percent": 20 }
  },
  "endpoints": {
    "alert_email":   { "from_env": "AGENCY_ALERT_EMAIL" },
    "slack_webhook": { "from_constant": "AGENCY_SLACK_WEBHOOK" }
  }
}

On the screen: Settings & Diagnostics → Configuration profile. From the command line:

wp wcaib profile-export agency-standard.json --name="Agency standard" --revision=3
wp wcaib profile-plan agency-standard.json
wp wcaib profile-apply agency-standard.json --dry-run
wp wcaib profile-apply agency-standard.json
wp wcaib profile-status
wp wcaib profile-rollback

2. Stale-update protection

ERP feeds often send the same product several times while the queue is busy. Updates for the same product are always applied in the order they arrived. With stale-update protection switched on, an older queued update is skipped when a newer queued update for the same product already contains every field the older one would write.

3. Price and stock guard

One wrong feed can set a whole catalogue to a price of 0.10 or empty the stock. The guard holds an update when it would change the current price or stock quantity by more than a percentage you choose.

wp wcaib held
wp wcaib release 321 322
wp wcaib release --all
wp wcaib reject --all

4. Safe replay of failed items

Items that failed all retries end up in the dead-letter queue (DLQ). Putting thousands of them back at once can overload the shop again, and replaying an old update can overwrite newer data. A replay is therefore a throttled job:

On the screen: Queue & DLQ Logs → Replay DLQ. From the command line the command is a dry run unless you add --yes:

wp wcaib replay-dlq --action-type=stock_update
wp wcaib replay-dlq --action-type=stock_update --yes --rate=30 --stop-percent=10
wp wcaib replay-status
wp wcaib replay-pause
wp wcaib replay-resume
wp wcaib replay-stop

Selecting items in the table and using "Re-queue Selected", or the retry button on a single item, stays an explicit choice and is not throttled.

5. Support bundle and monitoring

The support bundle is one read-only JSON file that answers the first questions of every support case: PHP, WordPress and WooCommerce versions, memory limit, queue numbers by status, the age of the oldest waiting item, items stuck in processing, the most common error messages, worker and Action Scheduler state, applied profile, and a plain-language list of problems it found (worst first).

wp wcaib triage --summary
wp wcaib triage --file=triage.json

GET /wp-json/wcaib/v1/triage
GET /wp-json/wcaib/v1/triage?include_skus=1

6. Webhook secrets

A Slack or Discord webhook address is a credential: anyone who has it can post into the channel. Pro stores the addresses encrypted in the database (the key is derived from the site's secret keys), so they do not show up in plain text in backups or database dumps. Addresses saved by earlier versions are encrypted automatically.

To keep them out of the database completely, define them in wp-config.php; a constant always wins over the stored value and the field on the settings screen becomes read-only:

define( 'WCAIB_SLACK_WEBHOOK',   'https://hooks.slack.com/services/…' );
define( 'WCAIB_DISCORD_WEBHOOK', 'https://discord.com/api/webhooks/…' );

If a site's secret keys (the salts in wp-config.php) are changed, a stored address can no longer be decrypted and counts as not set; enter it again.

7. What the ingest endpoint tells the sender

These two responses help the system that sends the feed to notice mistakes early. The first applies to every edition, the second to Pro.

8. WP-CLI reference

CommandWhat it does
wp wcaib statsQueue numbers.
wp wcaib runProcess waiting items now.
wp wcaib logsList queue rows. Filters: --status, --action-type, --engine, --sku, --batch, --search, --from, --to, --limit, --fields, --format.
wp wcaib settings-list|settings-get|settings-setRead and change settings; secrets are shown as set / not set; invalid values are refused.
wp wcaib profile-export|profile-plan|profile-apply|profile-status|profile-rollbackConfiguration profiles.
wp wcaib held|release|rejectUpdates held by the price and stock guard.
wp wcaib replay-dlq|replay-status|replay-pause|replay-resume|replay-stop|replay-tickSafe replay. replay-dlq is a dry run without --yes.
wp wcaib triageSupport bundle.
wp wcaib flushDelete rows by status.
wp wcaib export-settings|import-settingsSettings file export and import (validated completely before anything is written).

9. Settings reference

SettingProfile pathDefaultRange
batch_sizeprocessing.batch_size5010–500
max_attemptsprocessing.max_attempts31–10
enable_direct_sqlprocessing.direct_sqlnoyes / no (needs confirmation in a profile)
retention_daysretention.completed_days141–365
dlq_retention_daysretention.dead_letter_days0 (keep)0–3650
preserve_data_on_uninstallretention.preserve_data_on_uninstallnoyes / no
supersede_staleguard.supersede_stalenoyes / no
guard_price_percentguard.price_change_percent0 (off)0–1000
guard_stock_percentguard.stock_change_percent0 (off)0–1000
replay_ratereplay.items_per_minute501–1000
replay_stop_percentreplay.stop_failure_percent201–100
alert_email, slack_webhook, discord_webhookendpoints.*emptyonly from a constant or an environment variable in profiles

Questions

Write to support [at] hookretry.com and attach the support bundle if you have one. Back to the product page. Running Webhook Recovery too? See its Agency Guide.