As a technical user, you can customize Campaign datamodel to meet the needs of your implementation: add elements to an existing schema, modify an element in a schema or delete elements.
Key steps to customize Campaign datamodel are:
Built-in schema must not be modified directly. If you need to adapt a built-in schema, you must extend it.
To extend a schema, follow the steps below:
Navigate to the Administration > Configuration > Data schemas folder in the Explorer.
Click the New button and select Extend the data in a table using an extension schema.
Identify the built-in schema to extend and select it.
By convention, name the extension schema the same as the built-in schema, and use a custom namespace. Note that some namespaces are internal only. Learn more
Once in the schema editor, add the elements you need using the contextual menu, and save.
In the example below, we add the MembershipYear attribute, put a length limit for last name (this limit will overwrite the default one), and remove the birth date from the built-in schema.
<srcSchema created="YYYY-MM-DD" desc="Recipient table" extendedSchema="nms:recipient" img="nms:recipient.png" label="Recipients" labelSingular="Recipient" lastModified="YYYY-MM-DD" mappingType="sql" name="recipient" namespace="cus" xtkschema="xtk:srcSchema"> <element desc="Recipient table" img="nms:recipient.png" label="Recipients" labelSingular="Recipient" name="recipient"> <attribute label="Member since" name="MembershipYear" type="long"/> <attribute length="50" name="lastName"/> <attribute _operation="delete" name="birthDate"/> </element> </srcSchema>
Disconnect and reconnect to Campaign to check schema structure update in the Structure tab.
Update the database structure to apply your changes. Learn more
Once changes are implemented in the database, you can adapt the recipient input form to make your changes visible. Learn more