I’ve implemented a comprehensive solution for this exact scenario. The key is understanding that CSV export customization requires intervention at three levels: API response formatting, regional settings handling, and date format conversion.
Solution Architecture:
First, create a custom configuration service that extends ProcessAnalyticsService:
[ServiceContract]
public class CustomAnalyticsService : BaseService {
[OperationContract]
public Stream GetFormattedProcessData(string culture) {
// Implementation
}
}
CSV Export Customization:
The standard Analytics API doesn’t support culture-aware CSV formatting natively. You need to implement a custom export handler that:
- Retrieves data using EntitySchemaQuery against SysProcessLog and related entities
- Applies CultureInfo formatting to DateTime fields before CSV serialization
- Uses CsvHelper or similar library with configured DateTimeConverter
Regional Settings Handling:
Configure the service to read culture from request headers:
var culture = new CultureInfo(requestCulture);
var dateFormat = culture.DateTimeFormat.ShortDatePattern;
Then apply this format during CSV generation. Register the custom service in your workspace and configure it to handle /CustomAnalytics/Export endpoint.
Date Format Conversion:
For the actual conversion, create a custom TypeConverter:
public class CustomDateConverter : DefaultTypeConverter {
public override string ConvertToString(object value, IWriterRow row, MemberMapData memberMapData) {
if (value is DateTime dateTime) {
return dateTime.ToString("dd/MM/yyyy", CultureInfo.CurrentCulture);
}
return base.ConvertToString(value, row, memberMapData);
}
}
Register this converter in your CsvWriter configuration before generating the export.
Alternative Lightweight Approach:
If modifying the service layer is too complex, implement a middleware API that:
- Calls the standard Analytics API
- Parses the JSON response
- Transforms date fields using the requested culture
- Generates CSV with proper formatting
This keeps your Creatio instance unchanged while providing the required functionality. The middleware can be a simple Node.js or .NET Core service that sits between your client application and Creatio.
Both approaches ensure dates appear in DD/MM/YYYY format (or any culture-specific format) in the final CSV, making reports immediately usable for business users without manual conversion.