I asked a very similar question but it was suggested that I rephrase and re-ask it.
Let $B$ be a monoidal category with multiplication $\Box$. Let $P$ be a category and let $T \colon P^\mathrm{op} \to B$ and $S \colon P \to B$ be functors. MacLane [CWM, p226] says that these two functors have a "tensor product"
$ T \Box_P S = \int^{p\colon P} (Tp) \Box (Sp) .$
It is not obvious to me that this coend exists. What are the correct assumptions for this to be true? Should it be
If $B$ is cocomplete and $P$ is small then...
or maybe
If $B$ is cocomplete and $P$ is any category...
I am very interested in the second case and I was wondering if this is known to be true or not. Note that it does not make sense to assume $B$ has all (co)limits since necessarily this would force $B$ to be a preorder. So cocomplete of course means "has all small colimits".