The C# source below uses the Selerix .NET library and web services to prepare a Selerix data Transmittal, post it to BenSelect and obtain enrollment and census in the response. Values in orange indicate data fields that differ by applicant/family.
// Instantiate a Selerix Transmittal object and populate it with required values
Transmittal transmittalObj = new Transmittal();
transmittalObj.Group = new Group();
transmittalObj.PortfolioID = new Guid("87902A63-3EF7-43FA-ADA2-D9C9C9B4E0FE");
transmittalObj.SenderID = Guid.NewGuid();
transmittalObj.Type = TransmittalType.GetApplicants;
// Add the necessary information to obtain enrollment data for employees and their dependents.
// Requesting enrollment data for 3 employees using three different forms of identification
// to illustrate possible approaches. The first employee has not completed enrollment and
// has no prior coverages in the system so the system does not return dependent information.
transmittalObj.Applicants = new ApplicantCollection();
transmittalObj.Applicants.Add(new Applicant()
{
EmployeeIdent = "Employee_12345" // Example 1: Use EmployeeIdent for this employee
});
transmittalObj.Applicants.Add(new Applicant()
{
SSN = "998759263" // Example 2: Use employee's SSN for this one
});
transmittalObj.Applicants.Add(new Applicant()
{
FirstName = "Lucy", // Example 3: Use name and birthdate
LastName = "Boozman",
BirthDate = new DateTime(1952, 6, 5)
});
// Instantiate a web services wrapper object and have it point to the BenSelect URL
SelerixWS.Enrollment enrollment = new SelerixWS.Enrollment();
enrollment.Url = "https://benselect.com/qx/enrollment.asmx";
// Set the necessary security flags
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
string outboundTransmittalXML = SerializationHelper.SerializeToString(transmittalObj);
txtTransmittalSend.Text = outboundTransmittalXML;
string transmittalResult = enrollment.Query("testcaseqxenroller", "thePassword", outboundTransmittalXML);
if (transmittalResult.ToUpperInvariant().Contains("ERROR"))
sbpResult.Text = "Check return XML for error";
// Data is now in transmittalResult