PersonService
This services creates contacts in 24SevenOffice. The property Id is the primary ID and cannot be specified when creating a new contact. If you specify an Id, this means that you are updating a contact.
Warning
Please note: It is not possible to create employees through the PersonService.
PersonServicePersonService WSDL
Guides
Retrieve Contact
Retrive persons by using the GetPersons method or if you need more informtion on that contact, use the GetPersonsDetailed method. We recommend using the GetPersons method if you are able to.
<GetPersons xmlns="http://24sevenOffice.com/webservices">
<personSearch>
<ChangedAfter>2019-01-01T00:00:00</ChangedAfter>
</personSearch>
</GetPersons>
Save a contact
Save a person by using the SavePerson method.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<SavePerson xmlns="http://24sevenOffice.com/webservices">
<personItem>
<Comment>Add your comment here</Comment>
<ConsumerPersonNo>1234567</ConsumerPersonNo>
<Country>NO</Country>
<CustomerId>100</CustomerId>
<DateOfBirth>1995-01-01</DateOfBirth>
<Department>Development</Department>
<EmailAddresses>
<EmailAddress>
<Description>Work</Description>
<Type>Primary</Type>
<Value>Work@Work.com</Value>
</EmailAddress>
</EmailAddresses>
<EmployeeNumber>1234</EmployeeNumber>
<FaxNumber>
<Description>Fax Home</Description>
<Type>Primary</Type>
<Value>fax@fax.no</Value>
</FaxNumber>
<FirstName>Bob</FirstName>
<Gender>Male</Gender>
<LastName>Olsen</LastName>
<Nickname>Bobby</Nickname>
<PersonalStatus>Single</PersonalStatus>
<PhoneNumbers>
<PhoneNumber>
<Description>Work</Description>
<Type>Mobile</Type>
<Value>12345678</Value>
</PhoneNumber>
</PhoneNumbers>
<PostAddress>
<City>Skien</City>
<Country>NO</Country>
<County>Telemark</County>
<Description>Home</Description>
<PostalArea>Telemark</PostalArea>
<PostalCode>1234</PostalCode>
<State>Buskerud</State>
<Street>Teststreet 1</Street>
<Type>Post</Type>
</PostAddress>
<RelationData>
<RelationData>
<CustomerId>1234</CustomerId>
<Email>Olsen@email.no</Email>
<Mobile>12345678</Mobile>
<Phone>87654321</Phone>
<Title>Boss</Title>
</RelationData>
</RelationData>
<Url>homepage url</Url>
<Workplace>Industries AS</Workplace>
<WorkPosition>Boss</WorkPosition>
<IsPrivate>false</IsPrivate>
<HourCost>250</HourCost>
</personItem>
</SavePerson>
</soap:Body>
</soap:Envelope>
Add relation to a contact
Use the MakeRelation method to add a relation to a contact.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<MakeRelation xmlns="http://24sevenOffice.com/webservices">
<relation>
<ContactId>123456</ContactId>
<CustomerId>100</CustomerId>
<Email>olsen@email.no</Email>
<Mobile>12345678</Mobile>
<Phone>87654321</Phone>
<Title>Relation Olsen</Title>
</relation>
</MakeRelation>
</soap:Body>
</soap:Envelope>
Retrieve relations from a contact
The method GetRelations is used to retrieve relations or use the GetRelationsChangedAfter method to receive relations created after a specific date.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetRelations xmlns="http://24sevenOffice.com/webservices">
<personId>123456</personId>
</GetRelations>
</soap:Body>
</soap:Envelope>
Add notes to a contact
To save a note you need to use the AddNote method.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<AddNote xmlns="http://24sevenOffice.com/webservices">
<note>
<Subject>Note 1</Subject>
<Description>Note description</Description>
<PersonId>123456</PersonId>
</note>
</AddNote>
</soap:Body>
</soap:Envelope>
Retrieve notes from a contact
To retrieve notes you need to use the GetNotes method. And you have to input the personId as a parameter.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetNotes xmlns="http://24sevenOffice.com/webservices">
<personId>123456</personId>
</GetNotes>
</soap:Body>
</soap:Envelope>
Delete notes
To delete a note you need to use the DeleteNote method. You can also use the DeleteNoteById to delete a note. This method needs only the NoteId.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<DeleteNote xmlns="http://24sevenOffice.com/webservices">
<note>
<Id>1234</Id>
<Subject>Note 1</Subject>
<Description>Delete note</Description>
<EmployeeId>12345678</EmployeeId>
<DateAdded>2010-01-01</DateAdded>
<Date>2020-01-01</Date>
<PersonId>123456</PersonId>
</note>
</DeleteNote>
</soap:Body>
</soap:Envelope>
Retrieve contact id
To retrieve a contact id or personId use the GetPersonId or the GetPersonIdsByUserName method.
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetPersonId xmlns="http://24sevenOffice.com/webservices">
<consumerPersonNo>1234</consumerPersonNo>
</GetPersonId>
</soap:Body>
</soap:Envelope>
Methods
| Method | Input type | Return type | Description |
|---|---|---|---|
| AddCategoryToPerson | personId(Long), categoryId(Int) | Adds a CRM Category to a person | |
| RemoveCategoryFromPerson | personId(Long), categoryId(Int) | Removes a CRM Category from a person | |
| GetPersonCategoryList | personId(Long) | int[] | Returns a list of category ids for a specific person |
| GetPersonArrayCategoryList | personIds(Int[]) | PersonCategories[] | Returns a list of category ids for an array of persons |
| GetCategoryList | - | Category[] | Returns a list of all CRM categories |
| AddNote | NoteData | int | Adds a note and returns the Id of the added note |
| DeleteNote | NoteData | Deletes a note | |
| DeleteNoteById | noteId(Int) | Deletes a note by using the id | |
| GetNotes | personId(Long) | NoteData[] | Gets all notes for a specific person |
| GetPersonId | consumerPersonNo(String) | long | Gets 24SevenOffice’s Person Id that corresponds to the given Consumer Person Id |
| GetPersonIdsByUserName | username(String) | long[] | Gets a list of Person Ids from a username in 24SO’s system |
| GetPersons | PersonSearchParameters | PersonItem[] | Gets a list of persons |
| GetPersonsDetailed | PersonSearchParameters | PersonItem[] | Gets a list of persons with more detailed information |
| SavePerson | PersonItem | long | Saves a person and returns its ID |
| GetRelations | - | ||
| GetRelationsChangedAfter | datetime | ||
| MakeRelation | RelationData | bool | Insert/update relationdata between a company and a contact. |