Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards
SOLVED

Schema codes for understanding in Adobe campaign classic

Avatar

Level 3
Level 3

 

Hi Adobe team,

Kindly help for below codes in Adobe campaign classic,I have read the information on documents but facing hard time to understand 

 

1.How do you define key in the schema?

2.How do create a link between two schemas?

3.How do you define auto generated primary key in the schema?

4.Can we give a combination of fields as key for the schema and how?

5.what are the workflow instances?

 

@ParthaSarathy  

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @KD1 ,

You can define primary key of one of the schema attribute by using below syntax,

<key name="id" internal="true">
   <keyfield xpath="@customerId"/>
</key>

If there are combination of primary key, use syntax as below,

<key name="id" internal="true">
   <keyfield xpath="@customerId"/>
   <keyfield xpath="@email"/>
</key>

You can also define auto generated (32-bit long integer) primary key by defining autopk in element tag as below,

<element name="recipient" autopk="true">
...
</element>

For creating a link between 2 schema, refer this post on Tuesday tech bytes series.

 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @KD1 ,

You can define primary key of one of the schema attribute by using below syntax,

<key name="id" internal="true">
   <keyfield xpath="@customerId"/>
</key>

If there are combination of primary key, use syntax as below,

<key name="id" internal="true">
   <keyfield xpath="@customerId"/>
   <keyfield xpath="@email"/>
</key>

You can also define auto generated (32-bit long integer) primary key by defining autopk in element tag as below,

<element name="recipient" autopk="true">
...
</element>

For creating a link between 2 schema, refer this post on Tuesday tech bytes series.

 

Avatar

Level 3
Level 3

Hi @ParthaSarathy 

Is below code for db index correct?

 

<dbindex name="valid_email_mobile" label="valid_email_mobile">

<key field xpath="@valid_email"/> <keyfield xpath="@valid_mobile"/>

</dbindex>

 

And what will be db index name and label?

Avatar

Community Advisor

@KD1 , Label is optional, but have the name unique. Sample syntax for dbindex,

  <dbindex name="myIndex" label="My composite index">
         <keyfield xpath="@email"/>
         <keyfield xpath="@phone"/>
  </dbindex>

For more details on dbindex, refer here.