CompanyService

This service is used to create and get customer data from the CRM module. The main methods are SaveCompanies, GetCompanies and DeleteCompanies.

CompanyService
CompanyService WSDL

Data Types

Guides

GetCompanies

You can search for companies with any of the available CompanySearchParameters. You have to specify which properties you want in return with return properties.

SaveCompanies

In order to save a company, all you have to do is submit a Name and a Type to the method SaveCompanies. You probably want to add more information than that, but it will get you started. The Types you can choose from are: Lead, Consumer (also known as a private customer), Business and Supplier.

Please note: You cannot specify your own CompanyID since this is generated by the 24SevenOffice system. If you specify a CompanyId, this means you are updating an existing item. If you wish to specify your own Id you must use the ExternalId property. You can also use the method SaveMaps if you wish to save an array of Id relations. The data used in SaveMaps is only accessible through the API.

Below is a simple XML example of a request to SaveCompanies:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Body>
    <SaveCompanies xmlns="http://24sevenOffice.com/webservices">
      <companies>
        <Company>
            <Name>Test Name</Name>
            <Type>Business</Type>
        </Company>
      </companies>
    </SaveCompanies>
  </soap:Body>
</soap:Envelope>
1
2
3
4
5
6
7
8
9
10
11
12
13

SaveMaps

If you wish to use an external ID in addition to the 24SevenOffice ID, you can use the CompanyMap data type that consist of MapType, ExternalId and CompanyId. You use MapType to specify a type of mapping. This is useful if you are mapping several external Id’s. ExternalId is the external Id and CompanyId is the 24SevenOffice Id. Please note that these mapping references are not visible in the 24SevenOffice user interface, but only on a programmatic level through the API.

Methods

Method Input type Return type Description
GetCompanies CompanySearchParameters, returnProperties[] Company[] Returns a list of companies based on the search parameters. You need to specify the return properties.
DeleteCompanies Company[] Company[] Deletes an array of companies and returns the ones where a delete error occured. Only the Id-property of Company is required to delete.
SaveCompanies Company[] Company[] Saves all the companies in the array. This method also returns all companies, now with the Id if it is a new company. Please see APIException property for any save errors.
SaveRelations Relation[] Relation[] Saves an array of relations and returns the ones where an error occured.
DeleteRelations Relation[] Relation[] Deletes an array of relations and returns the ones where an delete error occured.
SaveMaps CompanyMap[] CompanyMap[] Saves an array of maps and returns the ones where an error occured.
DeleteMaps CompanyMap[] CompanyMap[] Deletes an array of maps and returns the ones where an delete error occured.
GetStatuses KeyValuePair[] Returns a KeyValuePair array of all CRM statuses. Key = StatusId, Value = StatusName
GetCategories Category[] Returns an array of all CRM categories.
SaveCategories Category[] Save an array of CRM categories.
GetIndustries KeyValuePair[] Returns a KeyValuePair array of all Industries. Key = Id, Value = Name
GetCustomerCategoryTree KeyValuePair[] Returns a KeyValuePair array of all Companies and their linked categories. Key = CategoryId, Value = CompanyId.
GetCustomerCategories Int32 Int32[] Returns an array of Category Ids linked to the specified customer
SaveCustomerCategories KeyValuePair[] APIException[] Saves categories to customers (Key = CategoryId, Value = CompanyId) and returns a list of errors (if any)
DeleteCustomerCategories KeyValuePair[] APIException[] Deletes categories from customers (Key = CategoryId, Value = CompanyId) and returns a list of errors (if any)
GetCRMGroups Group[] Returns a tree list of CRM Groups and sub groups