Trying to sync Microsoft Teams presence with Genesys Cloud and the BotConnector logic is… a choice. At my last shop, we had a similar setup where the bot just worked, but here we’re fighting the API for basic bot metadata.
The setup uses the Bot Framework SDK to push status updates. Everything’s fine until a new bot version is published. Then the lookup via /api/v2/integrations/botconnector/{integrationId}/bots/{botId} starts returning a 404 for the specific bot instance, even though the botId hasn’t changed. It’s like the API forgets the bot exists the second a new version is uploaded.
The versions list at /api/v2/integrations/botconnector/{integrationId}/bots/{botId}/versions shows the new version is active, but the main bot endpoint just gives up. It’s a classic race condition where the “current” version pointer is probably null for a few seconds during the swap.
I’ve tried a basic retry loop, but that’s just a band-aid. The fix should be that the platform doesn’t drop the bot object while updating the version.
// This is where it dies during the sync window
const response = await axios.get(`https://api.mypurecloud.com/api/v2/integrations/botconnector/${intId}/bots/${botId}`);
if (response.status === 404) {
console.log("Bot vanished into the void again");
}
Edit: realized the 404 only happens if the version query parameter is omitted. If I hardcode a specific version string from the versions list, it works. But that defeats the whole purpose of having a “current” version.