Consider a category $C$ and a monoid $M$. Consider a functor $F:C\to M$. It maps the objects of $C$ into the only object of $M$. But I don't want it to map every morphism of $C$ into the identity on $M$. If $f$ is a morphism in $C$, I would like in general $F(f)$ to be non-trivial.
Intuitively, this functor forgets only the underlying graph, and preserves (some of) the operations. In a way, it is the opposite of a forgetful functor. Does a functor with such properties have a name?
There is a construction of a "universal morphism" in Brown's Topology and Groupoids, chapter 8.1. We assume that $G$ is a groupoid, $\sigma:\text{Ob}(G)\to X$ is a set map. Then we can construct a groupoid $U$ whose object set is exactly $X$, and a morphism $\barσ:G\to U$ whose object function is $σ$. The idea is similar to the construction of the free product of groups. We form words of different lengths, where a word of length $n$ from $x$ to $x'$ is a tuple $$a=(a_n,...,a_1)$$ such that each $a_i$ is in $G(x_i,x_i')$ and
(a) $ x_i'\ne x_{i+1}$
(b) $σx_i'=σx_{i+1}$
(c) $σx_i=x,\ σx_n'=x'$
(d) no $a_i$ is the identity
We multiply two words by putting them end to end, composing in $G$ and cancelling identities whenever possible.
The resulting groupoid $U_σ(G)$ has as arrows $x\to x'$ words of arbitrary length, where a word of length $0$ is used as identity. If $x\in X\setminusσ(\text{Ob}(G))$, then the only word starting or ending at $x$ is $\mathbf 1_x$, the identity.
the morphism $\barσ:G\to U_σ(G)$ sends $a\ne \mathbf 1$ to $(a)$ and $a=\mathbf 1_{x_1}$ to $()_{σx_1}$
This groupoid has the following universal property:
If $g:G\to K$ is a morphism whose object function factors as $\text{Ob}(g)=\tauσ$, then there is a unique morphism $g^*:U_σ(G)\to K$ such that $g^*\barσ=g$ and $\text{Ob}(g^*)=\tau$.
Some interesting cases are when $X=\{*\}$ is a singleton and $σ:\text{Ob}(G)\to X$ the constant function. In that case we obtain a group $UG$ which is universal among all morphisms from $G$ to groups. This is in fact a left adjoint to the inclusion $\mathbf{Grp}\to\mathbf{Grpd}$.
The statements and proofs in that chapter carry over almost verbatim to the case of categories instead of groupoids, and monoids instead of groups.