createPersonalization(listID, personalizationID, personalizedState)
Creates a new personalization instance for a list component.
Returns
The personalization ID as a Promise.
Parameters
Name | Type | Description | Required |
listID | string | A unique ID referencing a list component. The length of the ID should be limited to 32 characters. | ✅ |
personalizationID | string | A temporary unique ID which will be replaced by the actual ID returned by this API. | ✅ |
personalizedState | object | An object containing information about the personalization state. | ✅ |
Usage example
In this example, the API creates a personalization instance and returns a personalization ID.
const listId = "443533r555";
const personalizationId = "L_343456";
const personalizedState = {
"name" : "Open bugs",
"markAsDefault" : true,
"personalizationState" : "{ filter : 'pyStatusWork = Open'}"
};
PCore.getPersonalizationUtils(listId).createPersonalization(personalizationId, personalizedState).then((response)=>{
const personalizationId = response;
});
Previous topic APIs in the PersonalizationUtils module Next topic deletePersonalization(listID, personalizationID)