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
    • Sticky Posts

    • Customer payment alerts in Zoho Cliq

      For businesses that depend on cash flow, payment updates are essential for operational decision-making and go beyond simple accounting entries. The sales team needs to be notified when invoices are cleared so that upcoming orders can be released. In contrast,
    • Automating Employee Birthday Notifications in Zoho Cliq

      Have you ever missed a birthday and felt like the office Grinch? Fear not, the Cliq Developer Platform has got your back! With Zoho Cliq's Schedulers, you can be the office party-cipant who never forgets a single cake, balloon, or awkward rendition of
    • Accelerate Github code reviews with Zoho Cliq Platform's link handlers

      Code reviews are critical, and they can get buried in conversations or lost when using multiple tools. With the Cliq Platform's link handlers, let's transform shared Github pull request links into interactive, real-time code reviews on channels. Share
    • App Spotlight : PagerDuty for Zoho Cliq

      App Spotlight brings you hand-picked apps to enhance the power of your Zoho apps and tools. Visit the Zoho Marketplace to explore all of our apps, integrations, and extensions. In today's fast-paced world, seizing every moment is essential for operational
    • Automate your status with Cliq Schedulers

      Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick