How get phone field (deals) value into my function code?

How get phone field (deals) value into my function code?

Hi, i have extension that connect to whatsapp. Zapphub is extension.

my code is working, but phone number is fixed: "5521993449999@c.us"
I need get value that is inside field "whatsapp1" inside deals module
this way, i will run automation everytime that deal is created.

This value is filled in this format: "+5521993449999", so i need remove "+" and add @c.us
this way, value will transform from "+5521993449999" to "5521993449999@c.us"
  1. // Definir a URL da solicitação
  2. url = "https://api.zapphub.com/v1/chat/xxxxxxx/chats";

  3. // Definir os cabeçalhos da solicitação
  4. headers = map();
  5. headers.put("Content-Type", "application/json");
  6. headers.put("Token", "yyyyyyyyyyyyyy");

  7. // Definir o corpo da solicitação
  8. body = '{"action":"assign","chats":["5521993449999@c.us"],"params":{"agent":"zzzzzzzzzzzzzz"}}';

  9. // Realizar a solicitação HTTP
  10. response = invokeurl(url, "PATCH", body, headers);

  11. // Verificar e exibir a resposta
  12. if (response != null && response != "") {
  13.     info response;
  14. } else {
  15.     info "Erro: Resposta vazia";
  16. }