Click or drag to resize
Infosoft Logo

Customers

This topic contains the following sections:

Customers are at the core of the InfoSystems suite, most actions in the system revolves around a customer either directly or indirectly. The following describes a few notes about what a customer is and how it can be managed via the Web Service API.

What is a customer?

A customer is the basic entity that encompasses information such as name, telephonenumber, email address, birth date and social security number. Information such as addresses, subscriptions, credit card agreements and almost everything else in the system is somehow connected to a customer. The term Customer is a bit imprecise, because a customer may or may not have bought something, he or she may or maynot be a reseller of products (a retailer), a payer of other subscriptions or something else entirely.

Customer Types

By default there are three customer types that are relevant:

  • Person

  • Company

  • Retailer

The type of the customer affects the features available and in some cases also how a feature works. For instance only some dynamic attributes are available on a person and others on a company or retailer. In most cases a customer is a person, and if not otherwise specified this is also the default when creating/manipulating customer entities.

Master Data and Production Data

It is important to understand that there is a distinction between production data and the master data of a customer. Typically production data is somehow associated with a title/legal entity and can be different from title to title.

Master data is the core information about the customer, such as the name, the customer type and the telephonenumber.

Production data is everything else, such as the resveration details, contact agreements, subscriptions and most importantly the addresses (refer to the address section for details).

Master data can be manipulated directly on the customer (see the customer Information section), while changes to the production data requires you to go through a seperate processes to change. Typically this is because other things might change as a consequence or because special auditing is needed to keep track of these changes. Typically the distinction is obvious and not something you have to think about.

Obtaining and Changing Customer Information

At the time of writing there are quite a few options for retrieving information about a customer. The recommendation is to use the method GetCustomerInformation to retrieve the master data and optionally main data for a subscription as well.

Example Response from GetCustomerInformation
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <GetCustomerInformationResponse xmlns="InfoWebService.Subscription">
         <GetCustomerInformationResult>
            <StatusCode>00</StatusCode>
            <CustomerNumber>123456</CustomerNumber>
            <TitleCode>IT</TitleCode>
            <Address>
               <CustomerNumber>0</CustomerNumber>
               <StatusCode>00</StatusCode>
               <CoAddress/>
               <StreetName>Østensjøveien</StreetName>
               <HouseNumber>36</HouseNumber>
               <Entrance/>
               <Floor/>
               <Apartment/>
               <ApartmentIdentity/>
               <ZipCode>0667</ZipCode>
               <ZipText>OSLO</ZipText>
               <CountryCode>NO</CountryCode>
               <CountryText>Norway</CountryText>
               <UniqueAddress>false</UniqueAddress>
               <NewAddress>false</NewAddress>
               <HousenumberStart>36</HousenumberStart>
               <HousenumberEnd>36</HousenumberEnd>
               <GateVei_Id>0</GateVei_Id>
               <DistributionCompanyCode>0</DistributionCompanyCode>
               <RouteNumber>0</RouteNumber>
               <DeliveryPoint>0</DeliveryPoint>
               <IsAddressVisible>true</IsAddressVisible>
            </Address>
            <Phone>
               <Telephone1>12345678</Telephone1>
               <Telephone2/>
               <Telephone3/>
               <Telephone4/>
               <PhoneLabel1/>
               <PhoneLabel2/>
               <PhoneLabel3/>
               <PhoneLabel4/>
            </Phone>
            <Subscription>
               <StatusCode>00</StatusCode>
               <CustomerNumber>123456</CustomerNumber>
               <TitleCode>IT</TitleCode>
               <SharedSubscriptionCount>0</SharedSubscriptionCount>
               <IsActive>true</IsActive>
               <IsElectronic>true</IsElectronic>
               <IsCombiProduct>true</IsCombiProduct>
               <StartDate>2015-04-22T00:00:00</StartDate>
               <LastStopDate>2015-05-02T00:00:00</LastStopDate>
               <NumberOfCopies>1</NumberOfCopies>
               <SubscriptionId>2</SubscriptionId>
               <Editions>123456</Editions>
               <TermCode>12</TermCode>
               <TermText/>
               <ProductCode>P6</ProductCode>
               <ProductText>Avis 6 dager</ProductText>
               <PaymentType>GIRO</PaymentType>
               <AgreementReference/>
               <Title>
                  <Text>Test Avis</Text>
                  <FreeCustomerPick>false</FreeCustomerPick>
                  <DefaultTitle>false</DefaultTitle>
                  <ShowTelephoneNumber>0</ShowTelephoneNumber>
                  <NumberOfCopies>0</NumberOfCopies>
               </Title>
               <PaymentAgreement_Id>0</PaymentAgreement_Id>
            </Subscription>
            <NumberOfPapers>0</NumberOfPapers>
            <Name>DOE JOHN</Name>
            <FirstName>JOHN</FirstName>
            <LastName>DOE</LastName>
            <ShowFirstName>false</ShowFirstName>
            <Email>john@doe.com</Email>
            <UCode/>
            <Syklus>A</Syklus>
            <CustomerHasAdvantageCard>false</CustomerHasAdvantageCard>
            <IsCustomerJustCreated>false</IsCustomerJustCreated>
            <CustomerTypeCode>PERSN</CustomerTypeCode>
            <NextContact>0001-01-01T00:00:00</NextContact>
            <LastResponseDate>0001-01-01T00:00:00</LastResponseDate>
            <ContactPersons>0</ContactPersons>
            <ConnectedAsContactPerson>0</ConnectedAsContactPerson>
            <CustomerTypeText>Personkunde</CustomerTypeText>
            <BirthDate>0001-01-01T00:00:00</BirthDate>
            <ExternalId/>
         </GetCustomerInformationResult>
      </GetCustomerInformationResponse>
   </soap:Body>
</soap:Envelope>

The above is an example of the response you get from a request to GetCustomerInformation with the optional title code to obtain some subscription information as well.

Updating Customer Information

Again a few varieties exists for updating customer details, but for new clients we recommend that you use the method UpdateCustomerDetails to change basic information.

Example Request to UpdateCustomerDetails
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://tech.infosoft.no/schemas/2011/10">
<soapenv:Header/>
    <soapenv:Body>
      <ns:UpdateCustomerDetailsRequest>
          <ns:CustomerNumber>123456</ns:CustomerNumber>
          <ns:CustomerDetails>
            <ns:FirstName>JANE</ns:FirstName>
            <ns:LastName>DOE</ns:LastName>
            <ns:Telephone1>87654321</ns:Telephone1>
            <ns:EMailAddress>jane@doe.com</ns:EMailAddress>
            <ns:BirthDate>1950-01-01</ns:BirthDate>
          </ns:CustomerDetails>
          <ns:Signature>WEBCLIENTTEST</ns:Signature>
      </ns:UpdateCustomerDetailsRequest>
    </soapenv:Body>
</soapenv:Envelope>

The above is an example of a request that updates the name, phone number and email of a customer. For completeness the response is included below.

Important note  Important

The customernumber cannot be changed, it is the identifier used to figure out which customer to update.

Note  Note

The signature is a marker for the customer services to enable them to know where the change was registered, typically this defaults to WEB if nothing is given.

Example Response from UpdateCustomerDetails
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
      <UpdateCustomerDetailsResponse xmlns="http://tech.infosoft.no/schemas/2011/10">
          <Customer z:Id="i1" xmlns:a="http://tech.infosoft.no/schemas/2012/08" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
            <a:CustomerCompanyLink i:nil="true"/>
            <a:CustomerType i:nil="true"/>
            <a:CustomerUser i:nil="true"/>
            <a:DefaultCommChannel i:nil="true"/>
            <a:JobTitle i:nil="true"/>
            <a:Language i:nil="true"/>
            <a:ConcurrencyToken>FeHjk3p2s/zgUAB/AQAgJQ==</a:ConcurrencyToken>
            <a:Customer_Id>1</a:Customer_Id>
            <a:Language_Id i:nil="true"/>
            <a:CommChannel_Id>1</a:CommChannel_Id>
            <a:Customer_CompanyLink_Id i:nil="true"/>
            <a:JobTitle_Id i:null="true></a:JobTitle_Id>
            <a:CustomerType_Id>1</a:CustomerType_Id>
            <a:FirstName i:nil="true"/>
            <a:LastName>DOE JANE</a:LastName>
            <a:Telephone1>87654321</a:Telephone1>
            <a:Telephone2 i:nil="true"/>
            <a:Telephone3 i:nil="true"/>
            <a:Telephone4 i:nil="true"/>
            <a:EMailAddress>jane@doe.com</a:EMailAddress>
            <a:EmailAddressAdditional1 i:nil="true"/>
            <a:EmailAddressAdditional2 i:nil="true"/>
            <a:CustomerNumber>123456</a:CustomerNumber>
            <a:BirthDate>1950-01-01T00:00:00</a:BirthDate>
            <a:SocialSecurityNumber i:nil="true"/>
            <a:AllowsJointInvoice>false</a:AllowsJointInvoice>
            <a:AllowsInvoicePayer>false</a:AllowsInvoicePayer>
            <a:FirstFirstNameFonetics i:nil="true"/>
            <a:FirstNameFonetics i:nil="true"/>
            <a:LastNameFonetics i:nil="true"/>
            <a:CustomerLockDate i:nil="true"/>
            <a:HasNotEmailSet i:nil="true"/>
            <a:OrganizationNumber i:nil="true"/>
            <a:GlobalLocationNumber i:nil="true"/>
            <a:LastChangedDate i:nil="true"/>
            <a:LastChangedBy i:nil="true&quot;/>
          </Customer>
      </UpdateCustomerDetailsResponse>
    </s:Body>
</s:Envelope>
Customer Dynamic Attributes

Dynamic attributes can be used to register extra information about/on a customer entity. To obtain registered dynamic attributes use the method GetCustomerDynamicAttributes(GetCustomerDynamicAttributesRequest) and to set the data use the method SetCustomerDynamicAttributes(SetDynamicAttributesRequest). Both methods are pretty much self explaining.

Note  Note

For details on what dynamic attributes are, refer to the section about custom values.