Prerequisite You are using https://crisp.chat/ Function Customer order ID will be set in chat session user data automatically. Implementation Add below code in /templates/<TemplateName>/account_order.html Reference https://help.crisp.chat/en/article/how-can-i-automatically-set-custom-user-data-1xh7pqk/
Automatically Set Order ID in Crisp Chat User Data
Posted on