Guild

Alias: guild

Demonstração do botão de ajuda

Clique no botão abaixo para simular a chamada que será feita a partir do PDV desta loja.

Código para embutir no site do PDV

URL da chamada (usada no iframe): https://voip.guild.com.br/guild/call

<!-- Botão de Pedir Ajuda - Guild -->
<button id="voipguild-btn" onclick="voipguildAbrirChamada()">🆘 Pedir Ajuda</button>

<div id="voipguild-modal" style="display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:9999;align-items:center;justify-content:center;">
  <div style="background:#fff;border-radius:12px;padding:16px;position:relative;">
    <button onclick="voipguildFecharChamada()" style="position:absolute;top:8px;right:8px;">✕</button>
    <iframe id="voipguild-frame" src="" allow="microphone" style="width:320px;height:480px;border:none;"></iframe>
  </div>
</div>

<script>
function voipguildAbrirChamada() {
  document.getElementById('voipguild-frame').src = 'https://voip.guild.com.br/guild/call';
  document.getElementById('voipguild-modal').style.display = 'flex';
}
function voipguildFecharChamada() {
  document.getElementById('voipguild-frame').src = '';
  document.getElementById('voipguild-modal').style.display = 'none';
}
// O softphone (dentro do iframe) avisa quando a chamada termina ou falha,
// para fechar o iframe automaticamente sem precisar de ação do atendente/cliente.
window.addEventListener('message', function (event) {
  if (event.data && event.data.source === 'voipguild' && event.data.action === 'close') {
    voipguildFecharChamada();
  }
});
</script>