Recommended Strategy: Hybrid Pull with Scheduled Tasks + Change Tracking
This tends to be the most stable and maintainable method in real-world Kentico integrations:
How It Works
Your CRM exposes a secure endpoint (API) for getting updated client profiles (delta feed or lastUpdated timestamp).
A scheduled task runs every few hours in Xperience:
Calls this API
Transforms the data
Updates or inserts data into Kentico (e.g., as Contact objects, custom classes, or personalization macros)
Why it's stable:
No reliance on real-time webhook delivery (which can fail silently)
Kentico's scheduled task system is robust and retry-friendly
Easier error logging, retry logic, and operational transparency
Integrates well with existing CMS architecture (dependency injection, logging, etc.)
Example Setup in Xperience by Kentico 13+
public class CRMContactSyncTask : IScheduledTask
{
private readonly ICRMClient _crmClient;
private readonly IContactRepository _contactRepository;
public CRMContactSyncTask(ICRMClient crmClient, IContactRepository contactRepository)
{
_crmClient = crmClient;
_contactRepository = contactRepository;
}
public async Task RunAsync(TaskExecutionContext context)
{
var updatedContacts = await _crmClient.GetUpdatedProfilesAsync(DateTime.UtcNow.AddHours(-2));
foreach (var crmContact in updatedContacts)
{
await _contactRepository.UpsertContactAsync(crmContact);
}
}
}
Registered using services.AddScheduledTask