Assign Conversation ID Snippet

This Snippet code generates a unique conversation ID for every contact. For example, you can use this with Google Contact Center AI agent assistants if you want to use a conversation ID to retrieve knowledge base articles to show to your agents.

The format for conversation IDs must be BusNo-<BusNo>_ContactId-<ContactId>, where <BusNo> is your business unit number and <ContactId> is the contact ID, held in the contactId variable, of the call. For example, BusNo-12345678_ContactId-987654321.

Add this code to a Snippet action in your script: 

// Assign conversationID using BusNo and ContactId
ASSIGN conversationID = "BusNo-{BusNo}_contactId-{contactId}"