© 2018 Capita Business Services Ltd. All rights reserved.

Capita Education Software Solutions is a trading name of Capita Business Services Ltd. Our Registered office is 30 Berners Street, London, W1T 3LR and our registered number is 02299747. Further information about Capita plc can be found in our legal statement.

SIMS 7 - TPPersonContactInfo

TPPersonContactInfo.GetXmlAddresses()

This interface will get information of all addresses within SIMS System. Sample output from this interface is as below

TPPersonContactInfo.GetXmlAddresses(int addressId)

This interface will get information of an address passed as a parameter. Sample output and code of this interface is as below

Example

TPPersonContactInfo cInfo = new TPPersonContactInfo();
string AddressXml = cInfo.GetXmlAddresses(1299);

Output

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<Addresses>
  <Address>
    <AddressID>1299</AddressID>
    <Apartment>HOUSE</Apartment>
    <HouseName />
    <HouseNo>35</HouseNo>
    <Street>GLADYS</Street>
    <District />
    <TownOrCity />
    <County />
    <PostCode />
    <Country>United Kingdom</Country>
    <SingleLineAddress>HOUSE 35 GLADYS</SingleLineAddress>
  </Address>
</Addresses>

TPPersonContactInfo.GetXmlPersonAddresses(System.DateTime)

This interface gets address id related to all persons in SIMS valid within the date supplied. The properties ‘AddressType’ and ‘Notes’ will be returned from this interface as these are properties of residency of a person rather than properties of Address. Sample output from this interface is as below

TPPersonContactInfo.GetXmlPersonAddresses(int personid)

This interface get address id related to person id supplied. Sample output from this interface is as below

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<PersonAddresses>
  <PersonAddress>
    <PersonID>6420</PersonID>
    <AddressID>3621</AddressID>
    <StartDate>2007-06-01T00:00:00</StartDate>
    <EndDate />
    <AddressType>H</AddressType>
    <Notes />
  </PersonAddress>
</PersonAddresses>

TPPersonContactInfo.GetXmlEmails()

This interface gets information of emails within SIMS system. Sample output from this interface is as below

TPPersonContactInfo.GetXmlEmails(int emailId)

This interface gets details of an email for the Email Id passed as a parameter. Sample code and output from this interface is as below

Example

TPPersonContactInfo cInfo = new TPPersonContactInfo();
string emailXml = cInfo.GetXmlEmails(24);

Output

<?xml version=\"1.0\" encoding=\"iso-8859-1\" standalone=\"yes\"?>
 <EmailAddresses>
 <EmailAddress>
 <EmailID>24</EmailID>
 <Location>H</Location>
 <Email_Address> singh@sainsburys.net </Email_Address> 
<IsMainEmail>T</IsMainEmail>
 <Notes />
 <Primary>T</Primary>
 </EmailAddress>
</EmailAddresses>

TPPersonContactInfo.GetXmlPersonEmails()

This interface gets email id related to a person id from the SIMS system. Sample output from this interface is below

TPPersonContactInfo.GetXmlPersonEmails(int personId)

This interface gets email id related to a person id. Sample output from this interface is as below

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<PersonEmailAddresses>
  <PersonEmail>
    <PersonID>6420</PersonID>
    <EmailID>67</EmailID>
  </PersonEmail>
</PersonEmailAddresses>

TPPersonContactInfo.GetXmlTelephones()

This interface gets information of all telephone numbers within SIMS system. Sample output from this interface is as below

TPPersonContactInfo.GetXmlTelephones(int telephoneId)

This interface gets information of the telephoneId supplied as a parameter. Sample code and output from this interface is shown below

Example

TPPersonContactInfo cInfo = new TPPersonContactInfo();
string data = cInfo.GetXmlTelephones(7284);

Output

<?xml version=\"1.0\" encoding=\"iso-8859-1\" standalone=\"yes\"?>
 <Telephone>
 <Telephone>
 <TelephoneID>7284</TelephoneID>
 <Device>T</Device>
 <Location>H</Location>
 <TelephoneNumber>853227</TelephoneNumber>
 <IsMainTelephone>T</IsMainTelephone>
 <Notes />
 <Primary>F</Primary>
 </Telephone>

TPPersonContactInfo.GetXmlPersonTelephones()

This interface gets information of email id’s related to all person id’s within SIMS system. Sample output from this interface is as below

TPPersonContactInfo.GetXmlPersonTelephones(int personId)

This interface gets information of email id related to a person id passed as parameter. Sample output from this interface is as below

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<PersonTelephones>
  <PersonTelephone>
    <PersonID>6420</PersonID>
    <TelephoneID>10073</TelephoneID>
  </PersonTelephone>
</PersonTelephones>

TPPersonContactInfo.GetXmlChangedAddresses(System.DateTime referenceDate)

This interface will get the information of any address added/updated or deleted from the SIMS system from the date supplied as parameter.

1) Calling the interface on referenceDate 04/01/2010 will get all the addresses from SIMS system as shown below:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo.GetXmlChangedAddresses(DateTime.Parse("04/01/2010"));

2) Let’s change one of the adddress in SIMS system on 05/01/2010. Calling the interface again will only get this changed address

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo.GetXmlChangedAddresses(System.DateTime.Now);

3) Delete address with address id ‘3621’ from the SIMS System and calling the interface again:

When an address is being deleted from SIMS [as an example], calling GetXmlChangedAddresses will only output the Address Id with the flag stating that it has been deleted from SIMS. Sample code and output is shown below:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo.GetXmlChangedAddresses(System.DateTime.Now);
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<Addresses>
  <Address deleted="true">
    <AddressID>3621</AddressID>
  </Address
</Addresses 

TPPersonContactInfo.GetXmlChangedEmails(DateTime referenceDate)

1) Calling the interface on referenceDate 04/01/2010 will get all the emails from SIMS system as shown below:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string alldata = contactInfo.GetXmlChangedEmails(DateTime.Parse("04/01/2010"));

2) Calling the interface after adding a new email [test@gmail.com]/updating an existing email with id 62 and deleting an email with id ‘60’ from SIMS system completely.

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo.GetXmlChangedEmails(System.DateTime.Now);
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<EmailAddresses>
  <EmailAddress deleted="true">
    <EmailID>60</EmailID>
  </EmailAddress>
  <EmailAddress>
    <EmailID>62</EmailID>
    <Location>O</Location>
    <Email_Address>2726modify@ga.com</Email_Address>
    <IsMainEmail>T</IsMainEmail>
    <Notes />
  </EmailAddress>
  <EmailAddress>
    <EmailID>71</EmailID>
    <Location>H</Location>
    <Email_Address>test@gmail.com</Email_Address>
    <IsMainEmail>T</IsMainEmail>
    <Notes />
  </EmailAddress>
</EmailAddresses

Email Id is only returned for the deleted telephone from SIMS system

TPPersonContactInfo.GetXmlChangedTelephones(DateTime referenceDate)

1) Calling the interface on referenceDate 04/01/2010 will get all the telephones numbers from SIMS system as shown below:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string alldata = contactInfo.GetXmlChangedTelephones(DateTime.Parse("04/01/2010"));

2)Calling the interface after adding a new telephone number[01234000000]/updating an existing telephone number with id ‘7286’ and deleting a telephone number with id ‘7284’ from SIMS system completely.

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo.GetXmlChangedTelephones (System.DateTime.Now);

Output :

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<Telephone>
  <Telephone deleted="true">
    <TelephoneID>7284</TelephoneID>
  </Telephone>
  <Telephone>
    <TelephoneID>7286</TelephoneID>
    <Device>T</Device>
    <Location>H</Location>
    <TelephoneNumber>01234 222222</TelephoneNumber>
    <IsMainTelephone>T</IsMainTelephone>
    <Notes />
  </Telephone>
  <Telephone>
    <TelephoneID>10916</TelephoneID>
    <Device>T</Device>
    <Location>H</Location>
    <TelephoneNumber>01234 000000</TelephoneNumber>
    <IsMainTelephone>T</IsMainTelephone>
    <Notes />
  </Telephone>
</Telephone>

Telephone Id is only returned for the deleted telephone from SIMS system

TPPersonContactInfo.GetXmlChangedPersonTelephones(DateTime referenceDate)

1) Calling the interface on referenceDate 04/01/2010 will get all the telephone id and associated person id’s from SIMS system as shown below:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo. GetXmlChangedPersonTelephones GetXmlChangedAddresses(DateTime.Parse("04/01/2010"));

2) Modify the telephone number attached to person id [4728]. Delete a telephone number attached to person id [5253] and add a new telephone number attached to person id [6420]. Calling the GetXmlChangedPersonTelephones() after the change has been done will produce the below output

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo. GetXmlChangedPersonTelephones GetXmlChangedAddresses(System.DateTime.Now);
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<PersonTelephones>
  <PersonTelephone deleted="true">
    <TelephoneID>9476</TelephoneID>
    <PersonID>5253</PersonID>
  </PersonTelephone>
  <PersonTelephone>
    <PersonID>4728</PersonID>
    <TelephoneID>9090</TelephoneID>
  </PersonTelephone>
  <PersonTelephone>
    <PersonID>4728</PersonID>
    <TelephoneID>9483</TelephoneID>
  </PersonTelephone>
  <PersonTelephone>
    <PersonID>6420</PersonID>
    <TelephoneID>10917</TelephoneID>
  </PersonTelephone>
</PersonTelephones>

TPPersonContactInfo.GetXmlChangedPersonEmails(DateTime referenceDate)

1) Calling the interface on referenceDate 04/01/2010 will get all the email and associated person id’s from SIMS system as shown below:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string data = contactInfo. GetXmlChangedPersonEmails (DateTime.Parse("04/01/2010"));

2) Modify the email address attached to student Adam Briony[5095]. Delete the email address attached to student David Abbey [6420]and add a new email address to student David Abbey

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string data = contactInfo. GetXmlChangedPersonEmails(System.DateTime.Now);

Output:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<PersonEmailAddresses>
  <PersonEmail deleted="true">
    <EmailID>72</EmailID>
    <PersonID>6420</PersonID>
  </PersonEmail>
  <PersonEmail>
    <PersonID>5095</PersonID>
    <EmailID>62</EmailID>
  </PersonEmail>
  <PersonEmail>
    <PersonID>6420</PersonID>
    <EmailID>73</EmailID>
  </PersonEmail>
</PersonEmailAddresses>

 

TPPersonContactInfo.GetXmlChangedPersonAddresses(DateTime referenceDate)

1) Calling the interface on referenceDate 04/01/2010 will get all the addresses id’s along with the associated person id’s from SIMS system as shown below:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo. GetXmlChangedPersonAddresses GetXmlChangedAddresses(DateTime.Parse("04/01/2010"));

2) Modify the contents of address attached to student Adam Briony[5095]. Delete the email address attached to student Ben Abbot [5253] and add a new email address to student David Abbey. Calling the interface after making these changes will produce below output:

TPPersonContactInfo contactInfo = new TPPersonContactInfo();
string changeddata = contactInfo. GetXmlChangedPersonAddresses GetXmlChangedAddresses(DateTime.System.DateTime.Now);

Output:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<PersonAddresses>
  <PersonAddress deleted="true">
    <PersonID>5253</PersonID>
    <AddressID>2587</AddressID>
    <StartDate>2004-09-01T00:00:00</StartDate>
    <EndDate />
    <AddressType>H</AddressType>
  </PersonAddress>
  <PersonAddress>
    <PersonID>6420</PersonID>
    <AddressID>4333</AddressID>
    <StartDate>2010-01-06T00:00:00</StartDate>
    <EndDate />
    <AddressType>SH</AddressType>
    <Notes />
  </PersonAddress>
</PersonAddresses>

As in the XML above as we had changed the contents of address associated with Adam Briony [5253], hence this will not be produced in GetXmlChangedPersonAddress() as the association between the address and person id is still same. This address will however be outputted in GetXmlChangedAddress()

 

 

 

 

Local - SIMS On-Premise Integration RESOURCES

Related resources for Local - SIMS On-Premise Integration