Olá Diana,
Para reproduzir o mesmo comportamento no aplicativo (ex.: Pega + Embeddable Framework), é necessário calcular o tempo desde a última mensagem no front-end:
1. Obter os detalhes da conversa:
GET /api/v2/conversations/{conversationId}
2. Identificar o timestamp da última mensagem enviada ou recebida (`messages[]`).
3. Calcular o tempo decorrido no seu front-end com base no horário atual:
- Ex.: `Date.now() - new Date(lastMessage.timestamp)`
4. Atualizar o timer na interface conforme desejado.
Se preferir atualização em tempo real, é possível utilizar notificações da conversa:
https://developer.genesys.cloud/devapps/notifications/conversations
Essa abordagem reproduz exatamente a lógica utilizada pelo Genesys UI.
Espero que ajude!
Hi Diana,
To display the same timer behavior in your custom application:
1. Retrieve the conversation details:
GET /api/v2/conversations/{conversationId}
2. Identify the timestamp of the last message (agent or customer).
3. Calculate the elapsed time in your front-end based on the current time and update the timer accordingly.
If you require real-time updates (e.g., when a new message arrives), you can subscribe to Conversation notifications:
https://developer.genesys.cloud/devapps/notifications/conversations
This approach matches how the Genesys UI displays the timer.
Hope this helps!
------------------------------
Fernando Sotto dos Santos
Consultor Grupo Casas Bahia
------------------------------
Original Message:
Sent: 11-10-2025 10:41
From: Diana Godinez
Subject: Embeddable Framework Widget - Display elapsed time since last message for digital interactions
Hello Developer Community!
Our SMS agents have migrated to using the Embeddable Framework with Pega. They've noticed that the timer for active SMS conversations show the conversations total time vs the elapsed time since the last message (sent by either customer or agent) like it does on the Genesys UI. (screenshots attached).
Please assist on how we can make updates to show the timer as the elapsed time since the last message in the embeddable framework just how we see in the Genesys UI.
Thank you.
#EmbeddableFramework
------------------------------
Diana Godinez
Engineer
------------------------------