Implement upsert workflow