The inferential discourse markers so and then indicate that the speaker infers or concludes something based on the evidence given in the previous utterance. In some cases, the two words are used in almost the same way, but in other cases, they have fine shades of difference in the usage. The difference is caused by the speaker's attitude toward what the other has said. Basically, so shows a kind of agreement, acknowledgement of what the other has said. In contrast, the speaker does not entirely agree with the other's opinions with then. I will explain the usage of so and then by way of example.