Way to tell if a chat has been initiated?

1 Comentarios

  • Tipene Hughes
    Zendesk Developer Advocacy

    Hey Andrew Wells,

    It sounds like the channel object might be what you're looking for. This will allow you to check the channel that the ticket is being created through, then running some logic based on that. Here's a quick example of how that could look:

    client.on("app.registered", async function () {
    const channel = await client.get("channel.name");
      console.log(channel);

    if(channel['channel.name'] === "chat") {
      const requester = await client.get('ticket.requester');
      console.log(requester)
    }
    });

    I hope this helps! Feel free to reach out with any questions.

    Tipene

    0

Iniciar sesión para dejar un comentario.

Tecnología de Zendesk