From a formal exchange to a friendly one
Bok is particularly useful once you are speaking informally with someone. It need not replace a polite farewell in a formal setting. When a conversation begins with a respectful greeting and stays fairly businesslike, Doviđenja is a good way to keep the same tone. This is useful at pharmacies, ticket offices and accommodation desks.
Coastal conversations and Italian
In parts of Istria, Italian and Croatian have official local roles. Hearing an Italian farewell there is therefore unsurprising. Elsewhere along the coast, Italian-looking words may also be familiar, but do not assume everyone speaks Italian. Follow the language in which your conversation has been taking place, rather than switching just because you are near the Adriatic.
When a farewell sounds final
Zbogom is a recognised Croatian farewell, but it can carry a more serious tone than a routine Doviđenja. If you have just paid for lunch, there is no need to emphasise the fact that you may never return. A conventional goodbye works even between people who have no plans to see each other again.