The FindCustomerByCustomTag function is used to to find one or more existing customers using a custom tag.

The custom tag you must specify consists of the tag name and value. You must give the entire custom tag name exactly as it exists in LAC. The custom tag value can be a partial entry (for example, to find all customers that include a tag value "NewCustomer" you could enter only "New") and is case-insensitive (for example, "NEW" and "new" are interpreted as the same entries).

This function also uses an offset and requires a login token, which is obtained using the Login function.

Return values

The response is of the type Soap_Response_List_Customer, with result_array of type ArrayOfSoap_Customer.

Example request

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="https://license.x-formation.com/soap/type/vendor/version/1">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:FindCustomerByCustomTag soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <token xsi:type="xsd:string">c2acbae7b6b11aa1d7ea4454b5b5cffe6ca015be</token>
         <name xsi:type="xsd:string">Tag1</name>
         <value xsi:type="xsd:string">1</value>
         <offset xsi:type="xsd:int">0</offset>
      </ns:FindCustomerByCustomTag>
   </soapenv:Body>
</soapenv:Envelope>

Example response

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://license.x-formation.com/soap/type/vendor/version/1" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Body>
      <ns1:FindCustomerByCustomTagResponse>
         <return xsi:type="ns1:Soap_Response_List_Customer">
            <result_array SOAP-ENC:arrayType="ns1:Soap_Customer[2]" xsi:type="ns1:ArrayOfSoap_Customer">
               <item xsi:type="ns1:Soap_Customer">
                  <id xsi:type="xsd:int">2</id>
                  <name xsi:type="xsd:string">c1</name>
                  <street xsi:nil="true"/>
                  <zip_code xsi:nil="true"/>
                  <city xsi:nil="true"/>
                  <state xsi:nil="true"/>
                  <country xsi:nil="true"/>
                  <phone_number xsi:nil="true"/>
                  <fax_number xsi:nil="true"/>
                  <vat_number xsi:nil="true"/>
                  <description xsi:nil="true"/>
                  <creation_time xsi:type="xsd:string">2012-04-25 09:52:44</creation_time>
                  <update_time xsi:type="xsd:string">2012-05-07 11:27:18</update_time>
                  <Contacts SOAP-ENC:arrayType="ns1:Soap_Contact[2]" xsi:type="ns1:ArrayOfSoap_Contact">
                     <item xsi:type="ns1:Soap_Contact">
                        <id xsi:type="xsd:int">1</id>
                        <name xsi:type="xsd:string">con1</name>
                        <email xsi:type="xsd:string">con1@test.com</email>
                        <customer_id xsi:type="xsd:int">2</customer_id>
                        <creation_time xsi:type="xsd:string">2012-04-25 11:09:29</creation_time>
                        <update_time xsi:type="xsd:string">2012-04-25 11:09:29</update_time>
                     </item>
                     <item xsi:type="ns1:Soap_Contact">
                        <id xsi:type="xsd:int">2</id>
                        <name xsi:type="xsd:string">con2</name>
                        <email xsi:type="xsd:string">con2@test.com</email>
                        <customer_id xsi:type="xsd:int">2</customer_id>
                        <creation_time xsi:type="xsd:string">2012-04-25 11:10:07</creation_time>
                        <update_time xsi:type="xsd:string">2012-04-25 11:10:07</update_time>
                     </item>
                  </Contacts>
                  <CustomTags SOAP-ENC:arrayType="ns1:Soap_CustomTag[2]" xsi:type="ns1:ArrayOfSoap_CustomTag">
                     <item xsi:type="ns1:Soap_CustomTag">
                        <name xsi:type="xsd:string">Tag1</name>
                        <value xsi:type="xsd:string">value1</value>
                        <creation_time xsi:type="xsd:string">2012-04-25 09:52:44</creation_time>
                        <update_time xsi:type="xsd:string">2012-05-14 15:09:02</update_time>
                     </item>
                     <item xsi:type="ns1:Soap_CustomTag">
                        <name xsi:type="xsd:string">Tag11111</name>
                        <value xsi:type="xsd:string">495867954867956</value>
                        <creation_time xsi:type="xsd:string">2012-04-25 09:52:44</creation_time> 
                        <update_time xsi:type="xsd:string">2012-05-14 15:09:02</update_time> 
                     </item>
                  </CustomTags>
               </item>
               <item xsi:type="ns1:Soap_Customer">
                  <id xsi:type="xsd:int">3</id>
                  <name xsi:type="xsd:string">customr3</name>
                  <street xsi:nil="true"/>
                  <zip_code xsi:nil="true"/>
                  <city xsi:nil="true"/>
                  <state xsi:nil="true"/>
                  <country xsi:nil="true"/>
                  <phone_number xsi:nil="true"/>
                  <fax_number xsi:nil="true"/>
                  <vat_number xsi:nil="true"/>
                  <description xsi:nil="true"/>
                  <creation_time xsi:type="xsd:string">2012-04-25 14:23:56</creation_time>
                  <update_time xsi:type="xsd:string">2012-04-25 14:23:56</update_time>
                  <Contacts SOAP-ENC:arrayType="ns1:Soap_Contact[0]" xsi:type="ns1:ArrayOfSoap_Contact"/>
                  <CustomTags SOAP-ENC:arrayType="ns1:Soap_CustomTag[2]" xsi:type="ns1:ArrayOfSoap_CustomTag">
                     <item xsi:type="ns1:Soap_CustomTag">
                        <name xsi:type="xsd:string">Tag2</name>
                        <value xsi:type="xsd:string">value2</value>
                        <creation_time xsi:type="xsd:string">2012-04-25 09:52:44</creation_time>
                        <update_time xsi:type="xsd:string">2012-05-14 15:09:02</update_time>
                     </item>
                     <item xsi:type="ns1:Soap_CustomTag">
                        <name xsi:type="xsd:string">Tag1</name>
                        <value xsi:type="xsd:string">value1</value>
                        <creation_time xsi:type="xsd:string">2012-04-25 09:52:44</creation_time>
                        <update_time xsi:type="xsd:string">2012-05-14 15:09:02</update_time>
                     </item>
                  </CustomTags>
               </item>
            </result_array>
            <result_code xsi:type="xsd:int">0</result_code>
            <result_string xsi:nil="true"/>
         </return>
      </ns1:FindCustomerByCustomTagResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>