Make Clientify CRM sync daily and reliable via incremental upsert.
Webhooks alone miss WooCommerce deals; replace wipe+cap sync with lookback upsert and a dedicated Dokploy cron. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -92,10 +92,10 @@ export async function GET(req: NextRequest) {
|
||||
};
|
||||
}
|
||||
|
||||
// 4) Clientify CRM → leads/deals
|
||||
// 4) Clientify CRM → leads/deals (prefer dedicated /api/cron/clientify-sync)
|
||||
try {
|
||||
const [clientify, gohighlevel] = await Promise.all([
|
||||
syncAllClientifyTenants(),
|
||||
syncAllClientifyTenants({ lookbackDays: Math.max(days * 2, 30) }),
|
||||
syncAllGhlTenants(),
|
||||
]);
|
||||
const results = [...clientify.results, ...gohighlevel.results];
|
||||
|
||||
Reference in New Issue
Block a user