Click or drag to resize

IeCommerceServiceContactCreate Method

Create a new contact

Namespace:  LSOmni.Service
Assembly:  LSOmni.Service (in LSOmni.Service.dll) Version: LS Omni 3.7.0
Syntax
C#
MemberContact ContactCreate(
	MemberContact contact
)

Parameters

contact
Type: LSRetail.Omni.Domain.DataModel.Loyalty.MembersMemberContact
contact

Return Value

Type: MemberContact
Contact
Exceptions
ExceptionCondition
LSOmniServiceExceptionStatusCodes returned:
  • StatusCode.Error
  • StatusCode.UserNamePasswordInvalid
  • StatusCode.PasswordInvalid
  • StatusCode.EmailInvalid
  • StatusCode.UserNameInvalid
  • StatusCode.UserNameExists
  • StatusCode.MissingLastName
  • StatusCode.MissingFirstName
  • StatusCode.AccountNotFound
Remarks
Nav/Central WS: MM_MOBILE_CONTACT_CREATE

Contact will get new Card that should be used when dealing with Orders. Card Id is the unique identifier for Contacts in LS Nav/Central

Contact will be assigned to a Member Account. Member Account has Club and Club has Scheme level.

If No Account is provided, New Account will be created. If No Club level for the Account is set, then default Club and Scheme level will be set.

Valid UserName, Password and Email address is determined by LS Nav/Central and can be found in CU 99009001.

Examples
Shows how Omni Object is mapped to LS Nav/Central WS Request
NAV WS mapping
<Request_ID>MM_MOBILE_CONTACT_CREATE</Request_ID>
<Request_Body>
   <LoginID>contact.UserName</LoginID>
   <Password>contact.Password</Password>
   <Email>contact.Email</Email>
   <FirstName>contact.FirstName</FirstName>
   <LastName>contact.LastName</LastName>
   <MiddleName>contact.MiddleName</MiddleName>
   <Gender>contact.Gender</Gender>
   <Phone>contact.Phone</Phone>
   <Address1>contact.Addresses.Address1</Address1>
   <Address2>contact.Addresses.Address2</Address2>
   <City>contact.Addresses.City</City>
   <PostCode>contact.Addresses.PostCode</PostCode>
   <StateProvinceRegion>contact.Addresses.StateProvinceRegion</StateProvinceRegion>
   <Country>contact.Addresses.Country</Country>
   <ClubID></ClubID>
   <SchemeID></SchemeID>
   <AccountID></AccountID>
   <ContactID></ContactID>
   <DeviceID>contact.Device.Id</DeviceID>
   <DeviceFriendlyName>contact.Device.DeviceFriendlyName</DeviceFriendlyName>
   <ExternalID></ExternalID>
   <ExternalSystem></ExternalSystem>
</Request_Body>
This Sample request can be used in SOAP UI application to send request to OMNI.

Include minimum data needed to be able to process the request

SOAP Sample Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://lsretail.com/LSOmniService/EComm/2017/Service" xmlns:ns="http://lsretail.com/LSOmniService/Base/2017" xmlns:ns1="http://lsretail.com/LSOmniService/Loy/2017" xmlns:lsr="http://schemas.datacontract.org/2004/07/LSRetail.Omni.Domain.DataModel.Loyalty.Baskets" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:ContactCreate>
         <ser:contact>
            <ns1:Account>
               <ns:Id></ns:Id>
               <ns1:Scheme>
                  <ns:Id></ns:Id>
                  <ns1:Club>
                     <ns:Id>CRONUS</ns:Id>
                  </ns1:Club>
               </ns1:Scheme>
            </ns1:Account>
            <ns1:Addresses>
               <ns:Address>
                  <ns:Address1>Santa Monica</ns:Address1>
                  <ns:City>Hollywood</ns:City>
                  <ns:Country>US</ns:Country>
                  <ns:PostCode>1001</ns:PostCode>
                  <ns:StateProvinceRegion></ns:StateProvinceRegion>
                  <ns:Type>Residential</ns:Type>
               </ns:Address>
            </ns1:Addresses>
            <ns1:Email>Sarah@Hollywood.com</ns1:Email>
            <ns1:FirstName>Sarah</ns1:FirstName>
            <ns1:Gender>Female</ns1:Gender>
            <ns1:Initials>Ms</ns1:Initials>
            <ns1:LastName>Parker</ns1:LastName>
            <ns1:MiddleName></ns1:MiddleName>
            <ns1:MobilePhone>555-5551</ns1:MobilePhone>
            <ns1:Password>SxxInTheCity</ns1:Password>
            <ns1:Phone>666-6661</ns1:Phone>
            <ns1:UserName>sarah</ns1:UserName>
         </ser:contact>
      </ser:ContactCreate>
   </soapenv:Body>            
</soapenv:Envelope>
Response Data from OMNI after Request has been sent
SOAP Response
 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Header>
      <ActivityId CorrelationId = "f6fac723-17d5-4592-8cf9-70f614208dfd" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">00000000-0000-0000-0000-000000000000</ActivityId>
   </s:Header>
   <s:Body>
      <ContactCreateResponse xmlns = "http://lsretail.com/LSOmniService/EComm/2017/Service" >
         < ContactCreateResult xmlns:a="http://lsretail.com/LSOmniService/Loy/2017" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" > MO000072 </ Id >
            < a:Account>
               <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" > MA000070 </ Id >
               < a:PointBalance>0</a:PointBalance>
               <a:Scheme>
                  <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" > CR1 - BRONZE </ Id >
                  < a:Club>
                     <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" > CRONUS </ Id >
                     < a:Name>Cronus Loyalty Club</a:Name>
                  </a:Club>
                  <a:Description>Cronus Bronze</a:Description>
                  <a:NextScheme>
                     <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" />
                     < a:Club>
                        <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" />
                        < a:Name/>
                     </a:Club>
                     <a:Description/>
                     <a:NextScheme i:nil= "true" />
                     < a:Perks/>
                     <a:PointsNeeded>0</a:PointsNeeded>
                  </a:NextScheme>
                  <a:Perks>Free MP3 Player - 64 Gb Silver when you upgrade to Cronus Silver Scheme</a:Perks>
                  <a:PointsNeeded>0</a:PointsNeeded>
               </a:Scheme>
            </a:Account>
            <a:Addresses xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" >
               < b:Address>
                  <b:Address1>Santa Monica</b:Address1>
                  <b:Address2/>
                  <b:CellPhoneNumber i:nil= "true" />
                  <b:City>Hollywood</b:City>
                  <b:Country/>
                  <b:HouseNo i:nil= "true" />
                  < b:Id/>
                  <b:PhoneNumber i:nil= "true" />
                  < b:PostCode/>
                  <b:StateProvinceRegion/>
                  <b:Type>Residential</b:Type>
               </b:Address>
            </a:Addresses>
            <a:AlternateId i:nil= "true" />
            < a:Basket xmlns:b= "http://schemas.datacontract.org/2004/07/LSRetail.Omni.Domain.DataModel.Loyalty.Baskets" >
               < Id xmlns= "http://lsretail.com/LSOmniService/Base/2017" > F8F76574 - 1111 - 4FBA-9424-023957776A94</Id>
               <b:Amount>0</b:Amount>
               <b:Items/>
               <b:NetAmount>0</b:NetAmount>
               <b:PublishedOffers xmlns:c= "http://lsretail.com/LSOmniService/Base/2017" />
               < b:ShippingPrice>0</b:ShippingPrice>
               <b:State>Dirty</b:State>
               <b:TAXAmount>0</b:TAXAmount>
            </a:Basket>
            <a:BirthDay>1753-01-01T00:00:00</a:BirthDay>
            <a:Card xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" >
               < b:Id>10084</b:Id>
               <b:BlockedBy/>
               <b:BlockedReason/>
               <b:ClubId>CRONUS</b:ClubId>
               <b:ContactId>MO000072</b:ContactId>
               <b:DateBlocked>1753-01-01T00:00:00</b:DateBlocked>
               <b:LinkedToAccount>false</b:LinkedToAccount>
               <b:Status>Active</b:Status>
            </a:Card>
            <a:Email>email @email.xxx</a:Email>
            <a:Environment xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" >
               < b:Currency>
                  <b:Id>GBP</b:Id>
                  <b:AmountRoundingMethod>RoundNearest</b:AmountRoundingMethod>
                  <b:Culture/>
                  <b:DecimalPlaces>2</b:DecimalPlaces>
                  <b:DecimalSeparator>.</b:DecimalSeparator>
                  <b:Description>British Pound</b:Description>
                  <b:Postfix/>
                  <b:Prefix>£</b:Prefix>
                  <b:RoundOffAmount>0.01000000000000000000</b:RoundOffAmount>
                  <b:RoundOffSales>0.01000000000000000000</b:RoundOffSales>
                  <b:SaleRoundingMethod>RoundNearest</b:SaleRoundingMethod>
                  <b:Symbol>£</b:Symbol>
                  <b:ThousandSeparator>,</b:ThousandSeparator>
               </b:Currency>
               <b:PasswordPolicy>5-character minimum; case sensitive</b:PasswordPolicy>
               <b:Version>2.4.0.0</b:Version>
            </a:Environment>
            <a:FirstName>Sarah</a:FirstName>
            <a:Gender>Female</a:Gender>
            <a:Initials/>
            <a:LastName>Parker</a:LastName>
            <a:LoggedOnToDevice>
               <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" />
               < a:BlockedBy i:nil="true"/>
               <a:BlockedDate>0001-01-01T00:00:00</a:BlockedDate>
               <a:BlockedReason i:nil="true"/>
               <a:CardId i:nil="true"/>
               <a:DeviceFriendlyName/>
               <a:Manufacturer/>
               <a:Model/>
               <a:OsVersion/>
               <a:Platform/>
               <a:SecurityToken>A041B7165A7B4C1ABD357A854D377B88|17-09-29 13:41:32</a:SecurityToken>
               <a:Status>0</a:Status>
            </a:LoggedOnToDevice>
            <a:MaritalStatus>Unknown</a:MaritalStatus>
            <a:MiddleName/>
            <a:MobilePhone/>
            <a:Name>Sarah Parker</a:Name>
            <a:Notifications>
               <a:Notification>
                  <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" > MN000001 </ Id >
                  < a:ContactId>MO000072</a:ContactId>
                  <a:Created>2017-09-29T13:41:32.86</a:Created>
                  <a:Description>Remember our regular offers</a:Description>
                  <a:Details>Cronus Club Members receive exra discounts</a:Details>
                  <a:ExpiryDate>2018-03-29T13:41:32.82</a:ExpiryDate>
                  <a:Images xmlns:b= "http://lsretail.com/LSOmniService/Base/2017" >
                     < b:ImageView>
                        <b:Id>OFFERS</b:Id>
                        <b:AvgColor>F6F2E4</b:AvgColor>
                        <b:DisplayOrder>0</b:DisplayOrder>
                        <b:Format/>
                        <b:Image/>
                        <b:ImgSize>
                           <b:Height>1000</b:Height>
                           <b:Width>1500</b:Width>
                        </b:ImgSize>
                        <b:LoadFromFile>false</b:LoadFromFile>
                        <b:Location>http://desktop-f9p79r1/lsomniservice/ecommerceservice.svc/ImageStreamGetById?id=OFFERS&amp;width={0}&amp;height={1}</b:Location>
                        <b:LocationType>Image</b:LocationType>
                        <b:ObjectId/>
                     </b:ImageView>
                  </a:Images>
                  <a:NotificationTextType>Plain</a:NotificationTextType>
                  <a:QRText/>
                  <a:Status>New</a:Status>
               </a:Notification>
            </a:Notifications>
            <a:Password/>
            <a:Phone/>
            <a:Profiles/>
            <a:PublishedOffers xmlns:b="http://lsretail.com/LSOmniService/Base/2017">
               <b:PublishedOffer>
                  <b:Id>PUB0038</b:Id>
                  <b:Code>Deal</b:Code>
                  <b:Description>Chicken, Salad and Fries</b:Description>
                  <b:Details>For only 9,50. Grilled Chicken marinated with our own recipe rich with a tasty flavor.Served with fresh salad, steak fries and our classic barbeque sauce</b:Details>
                  <b:ExpirationDate>1970-01-01T00:00:00</b:ExpirationDate>
                  <b:Images>
                     <b:ImageView>
                        <b:Id>PUBOFF-CHICKENS</b:Id>
                        <b:AvgColor/>
                        <b:DisplayOrder>0</b:DisplayOrder>
                        <b:Format/>
                        <b:Image/>
                        <b:ImgSize>
                           <b:Height>0</b:Height>
                           <b:Width>0</b:Width>
                        </b:ImgSize>
                        <b:LoadFromFile>false</b:LoadFromFile>
                        <b:Location>http://desktop-f9p79r1/lsomniservice/ecommerceservice.svc/ImageStreamGetById?id=PUBOFF-CHICKENS&amp;width={0}&amp;height={1}</b:Location>
                        <b:LocationType>Image</b:LocationType>
                        <b:ObjectId/>
                     </b:ImageView>
                  </b:Images>
                  <b:OfferDetails/>
                  <b:OfferId>S10017</b:OfferId>
                  <b:Selected>false</b:Selected>
                  <b:Type>General</b:Type>
                  <b:ValidationText/>
               </b:PublishedOffer>
            </a:PublishedOffers>
            <a:RV>0</a:RV>
            <a:Transactions/>
            <a:UserName>sarah</a:UserName>
            <a:WishList>
               <Id xmlns = "http://lsretail.com/LSOmniService/Base/2017" />
               < a:CardId>10084</a:CardId>
               <a:ContactId>MO000072</a:ContactId>
               <a:CreateDate>2017-09-29T13:41:32.9856902+00:00</a:CreateDate>
               <a:CustomerId/>
               <a:Description/>
               <a:IsDefaultList>false</a:IsDefaultList>
               <a:Items/>
               <a:ListType>Wish</a:ListType>
               <a:PublishedOffers/>
               <a:TotalAmount>0</a:TotalAmount>
               <a:TotalDiscAmount>0</a:TotalDiscAmount>
               <a:TotalNetAmount>0</a:TotalNetAmount>
               <a:TotalTaxAmount>0</a:TotalTaxAmount>
            </a:WishList>
         </ContactCreateResult>
      </ContactCreateResponse>
   </s:Body>
</s:Envelope>
See Also