Hello All
I am new to AEP world. Anyone created schema using AEPP package? If yes, could you please share the sample code snippets?
Thanks in Advance.
Regards
Sheejo Rapheal
Solved! Go to Solution.
Views
Replies
Total Likes
@sheejo what are type of schema are you creating?
I have not used it yet, but looking at the docs here's what you could try
1.) Experience Event Schema
createExperienceEventSchema( name="webEventSchema", mixinIds:[<list of your field group id required for the schema>], description = "schema description <optional>", )
2.) Profile Event Schema
createProfileSchema( name="crmProfileSchema", mixinIds:[<list of your field group id required for the schema>], description = "schema description <optional>", )
* you could get a list of field group for a sandbox and filter to get mixinId that you require for creating the schema.
//returns the fieldGroups of the account.
getFieldGroups()
Refer to this video which shows actual working demo
https://youtu.be/EBfTanow76w?t=1261
@sheejo what are type of schema are you creating?
I have not used it yet, but looking at the docs here's what you could try
1.) Experience Event Schema
createExperienceEventSchema( name="webEventSchema", mixinIds:[<list of your field group id required for the schema>], description = "schema description <optional>", )
2.) Profile Event Schema
createProfileSchema( name="crmProfileSchema", mixinIds:[<list of your field group id required for the schema>], description = "schema description <optional>", )
* you could get a list of field group for a sandbox and filter to get mixinId that you require for creating the schema.
//returns the fieldGroups of the account.
getFieldGroups()
Refer to this video which shows actual working demo
https://youtu.be/EBfTanow76w?t=1261
@Anil_Umachigi , I tried this way and it was working fine. I am trying to create a custom profile schema. How can I pass a json file (list of attributes) to create a schema instead of passing the mixinids? Is there any straight way?
Views
Replies
Total Likes
@sheejo Yes you can create a custom profile schema, however you cannot pass the fields (list of attributes) to create schema.
The create schema api ( python or in general) only accepts field group ids, so here's how i would sequence and approach it
For convention of field group object, see here
var loyaltyDetails = [ { "type" : "string", "title" : "Loyalty id", "defnition" : "" }, { "type" : "string", "title" : "Loyalty tier", "defnition" : "" }, { "type" : "string", "title" : "Loyalty name", "defnition" : "" }, ] createFieldGroup(fieldGroup_obj="loyaltyDetails")
// save the field group in a array
// now execute createSchema using field group ids.
Hi @sheejo
You can refer to the snippet in this link to create the FieldGroup. Then refer the $id of the Fieldgroup in the schema creation API.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies