web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

CIF Microsoft.CIFramework.createSession does not create a sessionId

(1) ShareShare
ReportReport
Posted on by 102

Hi All

Following the example to integrate CIF with Twilio here: https://github.com/microsoft/Dynamics365-Apps-Samples/tree/master/customer-service/channel-integration-framework/TwilioSampleInteg_version2

I have built the sales application but having issues with the JS file:

I have traced the issue back to no sessions id in the line:

Microsoft.CIFramework.createSession(inputBag).then(
(sessionId) => {
var sessionPh = new SessionInfo(PhoneState.Dialing, sessionId);

}

The sessionId is always null (full code below). Its not generating an error, just no sessionId. I cannot seem to find any other posts regarding this issue.

function ongoingCall() {
    debugger;
    var sess = phone.listOfSessions.get(phone.currentCallSessioId);
    if (sess == null || sess === undefined) {
        var inputBag = {
            "templateName": "TwilioCallSessionTemplate", "templateParameters": {}, "customerName": phone.name
        };
        Microsoft.CIFramework.createSession(inputBag).then(
            (sessionId) => {
                var sessionPh = new SessionInfo(PhoneState.Dialing, sessionId);
                sessionPh.name = phone.name;
                log("Dialing "   sessionPh.name);
                $('#callNotesField').text("");
                phone.listOfSessions.set(sessionId, sessionPh);
                phone.currentCallSessioId = sessionId;
                sessionPh.isOldSession = false;
                sessionPh.state = PhoneState.Ongoing;
            },
            (error) => {
                log("Error in session creation for dialing "   sessionPh.name);
            });
    }
    else {
        sess.isOldSession = true;
        sess.state = PhoneState.Ongoing;
    }
}

I have the same question (0)
  • mauriceCRM Profile Picture
    45 on at

    Hi nwood,

    I have the same problem. Did you get any further here? Do you maybe even have a solution?

    Kind regards

    Maurice

  • Suggested answer
    mauriceCRM Profile Picture
    45 on at

    Hi nwood,

    I figured something out:

    You have to create a record of the Session Template entity.

    But be careful: the unique name must be the same as from the session template (deprecated) (msdyn_recordid without hyphen: msdyn_a95c86160eaee911a984000d3a33efbc):

    TwilioCallSessionTemplate.jpg

    Kind regards

    Maurice

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Subra Profile Picture

Subra 142

#2
11manish Profile Picture

11manish 112

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 86 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans