The question is, why do you want to update variables using a backend?
You cannot send values midway just to update variables, unless it is part of a flow. Chat API is meant for establishing a chat conversation outside of webchat. In your previous thread I explained this.
If you can explain the use case, I can assist