cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to import two types at once via LDAP?

Former Member
0 Likes
265

I need to import two types with LDAP. The first one should be Employee the second one Address (with the specific Employee as owner)

My import configuration:

 <config>
      <types>
        <type>
          <code>Employee </code>
          objectclasses>
            <objectclass>Person</objectclass>
    		<!-- <objectclass>furtherObjectClasses</objectclass> -->
          </objectclasses>
    
          <attributes>
    
            <attribute>
              <ldap>cn</ldap>
              <hybris>uid</hybris>
              <impex>[unique=true]</impex>
            </attribute>
            <attribute>
              <ldap>givenName</ldap>
              <hybris>employeeFirstName</hybris>
            </attribute>
            <attribute>
              <ldap>sn</ldap>
              <hybris>employeeLastName</hybris>
            </attribute>
            <attribute>
              <ldap>mysalutation</ldap>
              <hybris>title</hybris>
              <impex>(code)</impex>
            </attribute>
            <attribute>
              <ldap>title</ldap>
              <hybris>academicTitle</hybris>
            </attribute>
            <attribute>
              <ldap>cn</ldap>
              <hybris>cn</hybris>
            </attribute>
            <attribute>
              <ldap>entryDN</ldap>
              <hybris>dn</hybris>
            </attribute>
          </attributes>
    
          <defaultimpexheaderentry>
            ldapaccount[virtual=true, default=true]; loginDisabled[virtual=true, default=false]; backofficeLoginDisabled[virtual=true, default=false]; activationDate[virtual=true,  dateformat=dd.MM.yyyy HH:mm:ss]
          </defaultimpexheaderentry>
     
        </type>
    
        <type>
          <code>Address</code>
          <objectclasses>
            <objectclass>organizationalPerson</objectclass>
          </objectclasses>
    
          <attributes>
            <attribute>
              <ldap>cn</ldap>
              <hybris>owner</hybris>
              <impex>(Employee.uid)[unique=true]</impex>
            </attribute>
            <attribute>
              <ldap>telephoneNumber</ldap>
              <hybris>phone1</hybris>
            </attribute>
            <attribute>
              <ldap>mobile</ldap>
              <hybris>cellphone</hybris>
            </attribute>
            <attribute>
              <ldap>mail</ldap>
              <hybris>email</hybris>
            </attribute>
          </attributes>
        </type>
      </types>
    
      <mappings>
        <mapping>
          <attributes>
            <attribute>cn</attribute>
          </attributes>
          <values>
    
          </values>
        </mapping>
      </mappings>
    </config>


The LDIFImportCronJob is able to finish successfully but will import only the Employee. The Address will be skipped. Does anyone have an idea, what went wrong? Do i have to use another LDIFImportCronJob which is able to handle two types or might the configuration maybe wrong? 


I would appreciate any feedback.

Accepted Solutions (0)

Answers (0)