Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/hooks/actions/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@

These hooks fire during third-party integration processing — scheduled jobs, feed processing, and notifications.

<explain-block title="fluentform/cleverreach_groups_fetch_incomplete">

<Badge type="tip" vertical="top" text="Pro" />

This hook fires when the CleverReach feed could not fetch the account's full group (list) set, so the settings dropdown is showing fewer lists than the account actually has.

A half-filled dropdown looks exactly like a small account, which is why this is surfaced rather than left silent. It fires only on a genuinely degraded fetch — an API error, a thrown exception, a page of unreadable rows, or the `max_pages` cap being reached while groups were still arriving. The ordinary endings (a short final page, or an API that ignores the paging parameters) do not fire it.

**Parameters**

- `$page` (int) The page index the fetch stopped on. `0` means the very first request failed
- `$collected` (int) How many groups were successfully collected before stopping
- `$reason` (string) Why it stopped — the API error message, the exception message, or a description such as `page 2 returned 50 unreadable rows`

**Usage**

```php
add_action('fluentform/cleverreach_groups_fetch_incomplete', function ($page, $collected, $reason) {
error_log(sprintf(
'CleverReach group list incomplete: stopped on page %d with %d groups — %s',
$page,
$collected,
$reason
));
}, 10, 3);
```

**Reference**

`do_action('fluentform/cleverreach_groups_fetch_incomplete', $page, $collected, $reason);`

This hook is located in FluentFormPro\Integrations\CleverReach\Bootstrap

</explain-block>

<explain-block title="fluentform/created_user">

**Description**
Expand Down
43 changes: 43 additions & 0 deletions src/hooks/filters/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,49 @@ This filter is located in FluentForm\App\Hooks\actions.php

</explain-block>

<explain-block title="fluentform/cleverreach_groups_pagination">

<Badge type="tip" vertical="top" text="Pro" />

This filter tunes how the CleverReach feed fetches the account's group (list) options for the feed settings dropdown.

CleverReach does not document paging on `/v3/groups`, so the fetch is deliberately additive: the first request carries no paging parameters, and further pages are only probed once a response comes back large enough to look capped. If the API ignores the parameters, the probe returns groups already held and the loop stops, so the result matches an unpaged fetch.

**Parameters**

- `$config` (array) Pagination settings
- `probe_from` (int) How many groups a response must contain before extra pages are probed. Default `50`. Any value below `1` disables probing entirely, restoring a single unpaged request.
- `max_pages` (int) Hard cap on requests per call. Default `20`. Values below `1` are clamped to `1`.

**Usage**

```php
add_filter('fluentform/cleverreach_groups_pagination', function ($config) {
// Never probe for extra pages — one unpaged request only.
$config['probe_from'] = 0;

return $config;
});
```

```php
add_filter('fluentform/cleverreach_groups_pagination', function ($config) {
// Large agency account: probe sooner and allow more pages.
$config['probe_from'] = 25;
$config['max_pages'] = 60;

return $config;
});
```

**Reference**

`apply_filters('fluentform/cleverreach_groups_pagination', $config);`

This filter is located in FluentFormPro\Integrations\CleverReach\Bootstrap

</explain-block>

<explain-block title="fluentform/failed_integration_email_body">

<Badge type="tip" vertical="top" text="Pro" />
Expand Down