Claude Skill

fluentcart-integrations-jobs

Builds and audits FluentCart product/global integration feeds, CRM/LMS/ webhook automations, BaseIntegrationManager providers, lifecycle-triggered provisioning, fct_scheduled_actions, Action Scheduler dispatch, retries, replay protection, logs, and maintenance jobs. Use when regi

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download lonsdale201-wp-agent-skills-fluentcart_fluentcart-integrations-jobs-52f6020.zip · 4 KB
Part of lonsdale201/wp-agent-skills — 226 skills

Install

skills CLI npx skills add https://github.com/Lonsdale201/wp-agent-skills/tree/main/fluentcart/fluentcart-integrations-jobs
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install lonsdale201-wp-agent-skills@llmmart
Git git clone https://github.com/Lonsdale201/wp-agent-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole lonsdale201/wp-agent-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

FluentCart integrations and background jobs

Choose between an integration feed, a direct lifecycle listener, and an addon-owned job based on configurability and durability. Every external side effect must tolerate delayed delivery, duplicate delivery, and partial failure.

Read integration-queue-map.md before adding a provider or diagnosing the queue.

Use the feed framework for configurable providers

Extend BaseIntegrationManager when store administrators need global/product feeds, event selection, conditional routing, provider credentials, smartcodes, priority, and background execution. Register the manager after FluentCart has loaded and implement:

  • a stable, addon-owned integrationKey;
  • getIntegrationDefaults() and getSettingsFields();
  • validateFeedData() with server-side normalization and secret handling;
  • processAction() for one resolved order/event/feed;
  • isConfigured()/API settings that never expose credentials to public output.

BaseIntegrationManager registers dynamic fluent_cart/integration/run/ execution. Do not dispatch that hook with browser-supplied feed/order data.

Choose lifecycle triggers precisely

IntegrationEventListener maps order_paid_done, cancellation/full refund, subscription activation/reactivation/cancellation/renewal/EOT/validity expiry, and shipped/delivered events. Revoke behavior is feed-configurable for the defined revoke hooks.

Use order_paid_done for canonical initial paid-order provisioning. Use subscription_renewed for all settled renewals. Do not hook or manually fire the internal fluent_cart/order_paid_async_private_handle action; its name marks an implementation detail and its payload/ordering may change.

Understand the two queue layers

FluentCart stores integration work and state in fct_scheduled_actions. Action Scheduler is then used as the dispatch/runner transport for parts of that work. An Action Scheduler row is therefore not always the complete business job. Inspect both stores, the order log, and provider response when debugging.

Core uses Action Scheduler group fluent-cart. Addons should use a unique group such as my-addon-fluentcart so cleanup, cancellation, support tools, and tests do not collide with core jobs.

If an addon needs durable custom work, own its schema/payload contract or use Action Scheduler directly. Do not insert arbitrary rows into fct_scheduled_actions and assume core will route them.

Make handlers replay-safe

  1. Build a stable operation key from provider, feed, event, and durable object.
  2. Re-read the current order/subscription before acting.
  3. Atomically claim or record the operation in addon-owned state.
  4. Use provider idempotency keys where available.
  5. Store sanitized outcome/reference and distinguish retryable from terminal failure.
  6. Throw or return failure in the way the selected runner actually observes; never mark complete in a finally block after a failed call.

The in-request pushed-feed cache only suppresses repeats in one PHP request. It is not durable deduplication.

The receipt fallback also exposes a nopriv fluent_cart_run_order_actions AJAX handler keyed by order_hash. It can trigger pending post-payment work for the resolved order. Treat the hash as a bearer trigger, never trust that request as a new authorization/settlement signal, and ensure every effect independently verifies current paid state and idempotency.

Audit queue lifecycle

Monitor pending age, running age, retry count, dead/failed volume, action/group, object existence, and Action Scheduler health. The 1.6.0 integration runner has early-return paths after setting a row to running or before completion; support tools should detect stale states rather than assuming every missing callback is a provider outage.

Do not assume plugin deactivation removed every scheduled action. Inventory Action Scheduler and WordPress-Cron recurrence after activation, deactivation, and reactivation, and unschedule only addon-owned hooks/groups.

Test matrix

Test global/product feeds, variation restriction, priority, disabled provider, all supported event and revoke hooks, initial versus renewal order, async and real-time mode, public receipt-trigger replay, duplicate event, worker crash before/after provider success, missing/deleted feed, missing order, exception, rate limit, credential rotation, retry exhaustion, stale running recovery, Action Scheduler unavailable, WP-Cron disabled, multisite, deactivation/reactivation, and redacted logs.

Cross-references

  • Use fluentcart-orders-transactions for event payload and settlement timing.
  • Use fluentcart-subscriptions-renewals for recurring triggers.
  • Use the wc-action-scheduler-jobs skill for Action Scheduler mechanics.

References

  • Official modules overview: https://dev.fluentcart.com/modules/
  • Verified Free source paths:
    • fluent-cart/app/Modules/Integrations/BaseIntegrationManager.php
    • fluent-cart/app/Modules/Integrations/GlobalIntegrationSettings.php
    • fluent-cart/app/Modules/Integrations/GlobalNotificationHandler.php
    • fluent-cart/app/Listeners/IntegrationEventListener.php
    • fluent-cart/app/Models/ScheduledAction.php
    • fluent-cart/app/Hooks/Scheduler/
    • fluent-cart/app/Events/
  • Verified Pro integrations:
    • fluent-cart-pro/app/Modules/Integrations/
Files (wp-agent-skills)
  • agents
    • openai.yaml 330 B
      interface:
        display_name: "FluentCart integrations and jobs"
        short_description: "Build replay-safe feeds and background work"
        default_prompt: "Use $fluentcart-integrations-jobs to implement or audit this FluentCart integration feed or background job with correct lifecycle timing, queue ownership, retries, and idempotency."
      
  • references
    • integration-queue-map.md 3.1 KB
      # FluentCart 1.6.0 integration and queue map
      
      ## Feed lifecycle
      
      ~~~text
      order/subscription lifecycle event
        -> select enabled integration providers
        -> load product and global feeds
        -> event, revoke and variation matching
        -> sort by priority and suppress same-request duplicate UUID
        -> run synchronously or create fct_scheduled_actions row
        -> Action Scheduler dispatch
        -> reload feed/order/customer/subscription
        -> fluent_cart/integration/run/{provider}
        -> provider side effect and outcome/log
      ~~~
      
      For order_paid_done, IntegrationEventListener selects real-time actions in the
      tested source. Do not infer all events have identical background behavior.
      
      ## Data stores and responsibilities
      
      | Layer | Responsibility |
      |---|---|
      | ProductMeta | Product-scoped feed configuration |
      | Meta | Global order-integration configuration |
      | fct_scheduled_actions | FluentCart business queue payload/status |
      | Action Scheduler | Dispatch and recurring/async execution |
      | Order logs | Operator-facing contextual failure evidence |
      | Addon idempotency state | Durable exactly-once effect approximation |
      
      There is no true exactly-once network delivery. Combine at-least-once-safe
      handlers with provider idempotency and reconciliation.
      
      ## Core mapped triggers
      
      - order_paid_done
      - order_status_changed_to_canceled
      - order_fully_refunded
      - subscription_activated
      - subscription_reactivated
      - subscription_canceled
      - subscription_renewed
      - subscription_eot
      - subscription_expired_validity
      - shipping_status_changed_to_shipped
      - shipping_status_changed_to_delivered
      
      The integration feed framework does not automatically map every FluentCart
      hook. A new trigger requires source-confirmed event availability and explicit
      feed-framework support or a direct listener.
      
      ## Retry classification
      
      Retry transient DNS/connect/timeouts, 408, 429 honoring Retry-After, and
      selected 5xx responses with bounded exponential backoff and jitter. Do not
      blindly retry invalid credentials, invalid payloads, access denial, or a
      provider-side permanent validation error. Reconciliation is safer than a new
      create call after an ambiguous timeout.
      
      ## Operational query checklist
      
      For a stuck integration, correlate:
      
      1. FluentCart scheduled row action/status/retry/object/feed payload.
      2. Matching Action Scheduler action/hook/group/log.
      3. Current feed enabled/configured state.
      4. Order/subscription current status and type.
      5. Addon operation/idempotency record.
      6. Provider request ID and redacted response.
      
      Treat long-running status without a live runner as stale. Recovery must be
      explicit and idempotent, never a bulk status flip followed by uncontrolled
      replay.
      
      ## Receipt fallback boundary
      
      IntegrationEventListener registers both authenticated and nopriv
      fluent_cart_run_order_actions AJAX callbacks. The handler resolves the first
      order by submitted order_hash, may fire core private paid handling for a
      non-renewal order, and may run a pending integration queue row. This is a
      receipt-delivery fallback, not proof that the caller owns or paid the order.
      Keep order UUIDs confidential and make downstream work depend on current
      server state plus durable deduplication.
      
  • SKILL.md 6.1 KB
    ---
    name: fluentcart-integrations-jobs
    description: >-
      Builds and audits FluentCart product/global integration feeds, CRM/LMS/
      webhook automations, BaseIntegrationManager providers, lifecycle-triggered
      provisioning, fct_scheduled_actions, Action Scheduler dispatch, retries,
      replay protection, logs, and maintenance jobs. Use when registering
      fluent_cart/integration/order_integrations, integration/run/* handlers,
      asynchronous order actions, background notifications, external API calls,
      order_paid_done provisioning, revoke events, scheduled cleanup, or debugging
      pending/running integration jobs.
    metadata:
      wp-skills-author: "Soczó Kristóf"
      wp-skills-contact: "mailto:lonsdale201@hotmail.com"
      wp-skills-plugin: "fluent-cart"
      wp-skills-plugin-version-tested: "1.6.0"
      wp-skills-wp-version-tested: "7.0.2"
      wp-skills-php-min: "7.4"
      wp-skills-last-updated: "2026-08-06"
    ---
    
    # FluentCart integrations and background jobs
    
    Choose between an integration feed, a direct lifecycle listener, and an
    addon-owned job based on configurability and durability. Every external side
    effect must tolerate delayed delivery, duplicate delivery, and partial failure.
    
    Read [integration-queue-map.md](references/integration-queue-map.md) before
    adding a provider or diagnosing the queue.
    
    ## Use the feed framework for configurable providers
    
    Extend BaseIntegrationManager when store administrators need global/product
    feeds, event selection, conditional routing, provider credentials, smartcodes,
    priority, and background execution. Register the manager after FluentCart has
    loaded and implement:
    
    - a stable, addon-owned integrationKey;
    - getIntegrationDefaults() and getSettingsFields();
    - validateFeedData() with server-side normalization and secret handling;
    - processAction() for one resolved order/event/feed;
    - isConfigured()/API settings that never expose credentials to public output.
    
    BaseIntegrationManager registers dynamic
    fluent_cart/integration/run/{integrationKey} execution. Do not dispatch that
    hook with browser-supplied feed/order data.
    
    ## Choose lifecycle triggers precisely
    
    IntegrationEventListener maps order_paid_done, cancellation/full refund,
    subscription activation/reactivation/cancellation/renewal/EOT/validity expiry,
    and shipped/delivered events. Revoke behavior is feed-configurable for the
    defined revoke hooks.
    
    Use order_paid_done for canonical initial paid-order provisioning. Use
    subscription_renewed for all settled renewals. Do not hook or manually fire the
    internal fluent_cart/order_paid_async_private_handle action; its name marks an
    implementation detail and its payload/ordering may change.
    
    ## Understand the two queue layers
    
    FluentCart stores integration work and state in fct_scheduled_actions. Action
    Scheduler is then used as the dispatch/runner transport for parts of that work.
    An Action Scheduler row is therefore not always the complete business job.
    Inspect both stores, the order log, and provider response when debugging.
    
    Core uses Action Scheduler group fluent-cart. Addons should use a unique group
    such as my-addon-fluentcart so cleanup, cancellation, support tools, and tests
    do not collide with core jobs.
    
    If an addon needs durable custom work, own its schema/payload contract or use
    Action Scheduler directly. Do not insert arbitrary rows into
    fct_scheduled_actions and assume core will route them.
    
    ## Make handlers replay-safe
    
    1. Build a stable operation key from provider, feed, event, and durable object.
    2. Re-read the current order/subscription before acting.
    3. Atomically claim or record the operation in addon-owned state.
    4. Use provider idempotency keys where available.
    5. Store sanitized outcome/reference and distinguish retryable from terminal
       failure.
    6. Throw or return failure in the way the selected runner actually observes;
       never mark complete in a finally block after a failed call.
    
    The in-request pushed-feed cache only suppresses repeats in one PHP request. It
    is not durable deduplication.
    
    The receipt fallback also exposes a nopriv
    fluent_cart_run_order_actions AJAX handler keyed by order_hash. It can trigger
    pending post-payment work for the resolved order. Treat the hash as a bearer
    trigger, never trust that request as a new authorization/settlement signal, and
    ensure every effect independently verifies current paid state and idempotency.
    
    ## Audit queue lifecycle
    
    Monitor pending age, running age, retry count, dead/failed volume, action/group,
    object existence, and Action Scheduler health. The 1.6.0 integration runner has
    early-return paths after setting a row to running or before completion; support
    tools should detect stale states rather than assuming every missing callback is
    a provider outage.
    
    Do not assume plugin deactivation removed every scheduled action. Inventory
    Action Scheduler and WordPress-Cron recurrence after activation, deactivation,
    and reactivation, and unschedule only addon-owned hooks/groups.
    
    ## Test matrix
    
    Test global/product feeds, variation restriction, priority, disabled provider,
    all supported event and revoke hooks, initial versus renewal order, async and
    real-time mode, public receipt-trigger replay, duplicate event, worker crash before/after provider success,
    missing/deleted feed, missing order, exception, rate limit, credential rotation,
    retry exhaustion, stale running recovery, Action Scheduler unavailable, WP-Cron
    disabled, multisite, deactivation/reactivation, and redacted logs.
    
    ## Cross-references
    
    - Use fluentcart-orders-transactions for event payload and settlement timing.
    - Use fluentcart-subscriptions-renewals for recurring triggers.
    - Use the wc-action-scheduler-jobs skill for Action Scheduler mechanics.
    
    ## References
    
    - Official modules overview: <https://dev.fluentcart.com/modules/>
    - Verified Free source paths:
      - fluent-cart/app/Modules/Integrations/BaseIntegrationManager.php
      - fluent-cart/app/Modules/Integrations/GlobalIntegrationSettings.php
      - fluent-cart/app/Modules/Integrations/GlobalNotificationHandler.php
      - fluent-cart/app/Listeners/IntegrationEventListener.php
      - fluent-cart/app/Models/ScheduledAction.php
      - fluent-cart/app/Hooks/Scheduler/
      - fluent-cart/app/Events/
    - Verified Pro integrations:
      - fluent-cart-pro/app/Modules/Integrations/
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related