diff --git a/backend/app.py b/backend/app.py index 6d36270..3525c6b 100644 --- a/backend/app.py +++ b/backend/app.py @@ -294,12 +294,17 @@ def get_all_data(): # Enrich message with parent conversation data enriched_msg["User_ID"] = parent_conv.get("User_ID") - + # CRITICAL: Ensure Assistant_ID is properly propagated assistant_id = parent_conv.get("Assistant_ID") enriched_msg["Assistant_ID"] = assistant_id - + enriched_msg["Brand_Voice_Setting"] = parent_conv.get("Brand Voice Setting") + + # Add timestamp to message - use message's native timestamp if available, + # otherwise fallback to parent conversation's StartTime + enriched_msg["Timestamp"] = msg.get("Timestamp") or parent_conv.get("StartTime") + enriched_messages.append(enriched_msg) else: messages_missing_parent += 1