Issue with Start Time when editing Interaction via BizOpps SOAP API

We're integrating Freshdesk and BBCRM. I'm using Integromat to facilitate writing HTTP requests to the BizOpps SOAP API, particularly logging tickets as an Interaction.

On INTERACTION Table there are some columns of a custom type (UDT_HOURMINUTE) for the Actual Start Time/End and Expected Start Time/End. These columns can't be null. When adding or editing through the GUI forms they seem to be populated with 4 spaces. However in the SOAP definition for the Interaction Edit Form 5 they're type int. This meant I couldn't pass spaces as the value but it did allow me to xsi:nil = “true” the attribute.

I then had an error saying that a check contrainst was failing. there's one that checks that if ExpectedStartTime is populated there must be a Time zone passed as well. This CK checks that the incoming ExpectedStartTime is ‘’ or null. I've run SQL Profiler on the requests and I can see that leaving it blank on the GUI form passes it as a ‘’ however when I nil the attribute in the HTTP request it's showing in profiler as ‘0000’ and I think that's making the check fail.

Has anyone else had success using the Interaction Edit Endpoint or does anyone have an idea how I can get around this issue.

Any help much appreciated, already on second possible solution after failing to get the REST API working!

Comments

  • Hey Gethin,

    Here's a small snippet of code that let me update an interaction by calling the BizOpps endpoint that hopefully will lead you in the right direction.

    InteractionEdit.LoadDataRequest lReq = new ConsoleApp1.InteractionEdit.LoadDataRequest();
    InteractionEdit.LoadDataReply lRep;

    InteractionEdit.SaveDataRequest sReq = new InteractionEdit.SaveDataRequest();
    InteractionEdit.SaveDataReply sRep;

    using (InteractionEdit.EditRecordService s = new InteractionEdit.EditRecordService())
    {
    s.Credentials = new System.Net.NetworkCredential() { Domain = "Domain", UserName = "User", Password = "12345" };

    lReq.RecordID = "7b465397-8773-44f6-a286-3d7e3013da85";
    lRep = s.LoadData(lReq);

    sReq.RecordData = lRep.RecordData;
    sReq.RecordID = "7b465397-8773-44f6-a286-3d7e3013da85";

    sReq.RecordData.EXPECTEDSTARTTIME = new InteractionEdit.BizOpsHourMinute() { Hour = 5, Minute = 0 };
    sReq.RecordData.ACTUALSTARTTIME = new InteractionEdit.BizOpsHourMinute() { Hour = 5, Minute = 0 };
    sReq.RecordData.ACTUALENDTIME = new InteractionEdit.BizOpsHourMinute() { Hour = 5, Minute = 30 };
    sReq.RecordData.EXPECTEDENDTIME = new InteractionEdit.BizOpsHourMinute() { Hour = 5, Minute = 30 };

    sRep = s.SaveData(sReq);

    if (!sRep.StatusOK)
    throw new System.Exception(sRep.StatusMessage);
    Console.Read();
    }

    Note: InteractionEdit is the name of my reference to the BizOps endpoint.

    If you want to have a blank value for the times then just create a new instance of it without the Hour and minute inside of the braces:

    sReq.RecordData.EXPECTEDSTARTTIME = new InteractionEdit.BizOpsHourMinute();

    If you have any questions feel free to reach out directly.

Categories