Schema codes for understanding in Adobe campaign classic | Community
Skip to main content
Level 3
April 14, 2025
Solved

Schema codes for understanding in Adobe campaign classic

  • April 14, 2025
  • 1 reply
  • 679 views

 

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  

Best answer by ParthaSarathy

Hi @kd1-1 ,

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.

 

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
April 14, 2025

Hi @kd1-1 ,

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.

 

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
KD1-1Author
Level 3
April 14, 2025

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?

ParthaSarathy
Community Advisor
Community Advisor
April 15, 2025

@kd1-1 , 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.

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups