You are quite right to say that in general conditionals "if A then B" are not truth functions and so cannot be defined by a truth table. The only exception is the classical material implication (or material conditional) which is defined by equivalence to "(not A) or B", or to "not(A and not B)". Material implication is the simplest of all the conditionals but it is only one of many. It is useful in mathematics and formal logic, but is not typical of ordinary English usage. Some other conditionals include connexive conditionals, relevant implication, conditional probabilities, strict implication, variably strict implication, counterfactual conditionals, intuitionistic implication, etc.
Also, some linguists have advanced the thesis that it is a mistake to think of conditionals as a sentential connective at all. Angelika Kratzer, for example, has this to say:
The history of the conditional is the story of a syntactic mistake.
There is no two-place "if...then" connective in the logical forms for
natural languages. If-clauses are devices for restricting the domain
of operators.
- Modals and Conditionals, Oxford, (2012), p.106.
Unfortunately many elementary textbooks of logic introduce material implication and leave the reader with the impression that this is all there is to conditionals, which is highly misleading and does a great disservice. The logic of conditionals is an immense subject on which thousands of papers and scores of books have been published, and it is still being actively researched. If you are interested in finding out more, I can recommend
- Jonanthan Bennett, Conditionals: A Philosophical Guide, Oxford, (2003)
- Ernest Adams, The Logic of Conditionals, Reidel, (1975)
- David Lewis, Counterfactuals, Oxford, (1973)
- Nicholas Rescher, Conditionals, MIT Press (2007)
- David Sanford. If P then Q: Conditionals and the Foundations of Reasoning, Routledge (2003).