How to tag a user within a message via API

How to tag a user within a message via API

How can we tag a user within an automated message when posting to a channel from within the CRM via custom function

Scenario
We have accounts who get put on credit hold when they don't pay. When we do this it triggers a custom function to post a message to a channel. I'm trying to tag the account owner within the message so it's directed specifically to them. 

I'm unable to find it within the API documentation. 

My Code Snippet is below...


  1. //Invoke the user connector function and assign the the map "mp"
  2. resp = zoho.crm.invokeConnector("crm.getusers",mp);
  3. respMap = resp.get("response").toMap();

  4. users = respMap.get("users");
  5. userList = users.toJSONList();
  6. ownerList = List();
  7. userMap = Map();

  8. for each  user in userList
  9. {
  10. eachUser = user.toMap();
  11. if(eachUser.containValue(ownerName))
  12. {
  13. ownerList.add(eachUser.get("email"));
  14. userMap.put("email",eachUser.get("email"));
  15. userMap.put("channelName",eachUser.get("Sales_Channel_API"));
  16. ownerEmail = eachUser.get("email");
  17. }
  18. }
  19. info userMap;
  20. repMessage = "@" + ownerName + " any update on this Account payment? \n\n";
  21. repChannel = userMap.get("channelName");
  22. //View Account Url
  23. url = "https://crm.zoho.com/crm/orgXXXXX/tab/Accounts/" + id;

  24. title = "Credit Hold Notice For";
  25. subj = accName;
  26. body = repMessage + "This account (& any child accounts) are on credit hold. \n\nNo orders will be shipped for this account.";

  27. payload = {"text":subj,"bot":{"name":"Accounts Dept"},"card":{"title":title,"theme":"modern-inline"},"buttons":{{"label":"View Account","action":{"type":"open.url","data":{"web":url}},"type":"+"}},"slides":{{"type":"text","title":"----------","data":body}}};
  28. resp = zoho.cliq.postToChannelAsAdmin(repChannel,payload,"zcliq2");

Thanks in advance