upsert into alert history