Configuration
Configuration is held in a single end point at
An annotated example can be found at
Properties
| Name | Type | Description |
|---|---|---|
| ctm | Object | The comms template manager application and variations to use. The default application name is "Subscriptions" and the two variants are "Alerts" and "PIN" |
| Object | Each key in this object is a named subsite and its value an object which defines various email settings | |
| email.subsiteName | Object | An object with the following properties, and subsiteName the internal name of the subsite:
|
| image | Object | An object with the single property "constraint". This provides resize instructions when fetching article information and can be used in your email templates |
| metadata | Object | See below |
| object | Object | An object with the single property "type". This is the object type used to store subscription data. The default value is "SUBSCRIPTION" |
| schedule | Object | An object with the single property "period". This is an integer and defines the number of days to look back for article updates. Take care to update your end point schedule if you change this from the default 7 |
| user | Object | An object with the properties whose keys are the names of subsites and values the IDs of website users able to access secure content on that subsite |
function(params, credentials) {
return {
ctm: {
application: 'Subscriptions',
variations: {
alerts: 'Alerts',
pin: 'PIN'
}
},
dates: {
format: 'D MMMM YYYY'
},
email: {
subsitename: {
address: '[email protected]',
name: '{Client Subsite} Updates',
lang: 'EN',
template: 'Client Subsite'
}
},
image: {
constraint: "standard"
},
metadata: {
subsitename: [{
groups: [],
properties: [{
title: 'Property 1',
property: 1
}, {
title: 'Property 2',
property: 2
}],
parent: {
id: 1234,
title: 'Latest Group 1 Articles'
}
}, {
groups: [],
properties: [{
title: 'Property 5',
property: 5
}],
parent: {
id: 4321,
title: 'Latest Group 2 Articles',
}
}]
},
object: {
type: 'SUBSCRIPTION'
},
schedule: {
period: 7
},
user: {
subsitename: 1234
}
};
}
Metadata
The metadata defined in your configuration is used to populate the checkboxes on the subscriptions management form, and by the product to work out if an article should be added to the subscriptions email.
The metadata object has the following properties.
| Name | Type | Description |
|---|---|---|
| [subsitename] | Array | Each property in metadata should match the internal name of the subsite for which it is defined, and will be an array of objects, each representing a "subscription group" |
| [subsitename].groups | Array | An array of website user group names. Only users in this group will be able to see these subscription options on the manage subscription form. Leave it empty to all all groups |
| [subsitename].properties | Array | Each object in this array represents a metadata property. Enter a title and the metadata property ID. Each property creates a checkbox accordion on the manage subscription form with the values of the property |
| [subsitename].parent | Object | The title entered here is used in the subscription emails as the heading above links to the new articles. The ID is an article ID. Only articles (with relevant metadata) created beneath this parent will be considered for subscriptions |
Example
