LePatron is an opensource email builder allowing to industrialize your email template production. Build tailor made email templates and make them available to your non-technical users.
Currently, the LePatron interface doesn't have the ability to insert personalization variables.
Back:
We have groups endpoints under /api/groups but nothing yet for the personalized variables.
How?
In the server directory, we will do the following:
[ ] Create a new folder personalized-variables with the necessary endpoints.
[ ] Add new personalized-variablecollection with fields label, variable and group. The group field will hold the id of the group the personalized variable belongs to, to establish a relation and ensure we can retrieve variables for a specific group
[ ] Create a new schema personalized-variable.schema.js inside personalized-variables folder .
[ ] Add the controller functions inside packages/server/group/group.controller.js for handling the API endpoints.
[ ] Add new API endpoints under /api/groups/:groupId/personalized-variables to get, create, update and delete personalized variables. These endpoints will be accessible only to group admins, except for the GET endpoint which can also be accessed by regular users. inside packages/server/group/group.routes.js
GET/api/groups/:groupId/personalized-variables - this endpoint will return all personalized variables associated with the specified group ID.
POST/api/groups/:groupId/personalized-variables - this endpoint will be used to create a list of personalized variable or update a list in the specified group. The request body should contain the details of the personalized variable array to be created or updated (i.e., label and variable).
DELETE/api/groups/:groupId/personalized-variables/:variableId - this endpoint will be used to delete a personalized variable from the specified group.
[ ] Create a new service personalized-variable.service.js inside personalized-variables which contain services for the diffrents endpoints
Description / Why this is needed?
The aim of this feature is to allow users to insert their ESP's personalization variables without the need to type them manually.
Links / Resources
Link of the US
Current State / Investigations
Front:
Back:
/api/groups
but nothing yet for the personalized variables.How?
In the server directory, we will do the following:
personalized-variables
with the necessary endpoints.personalized-variable
collection
with fieldslabel
,variable
andgroup
. Thegroup
field will hold the id of the group the personalized variable belongs to, to establish a relation and ensure we can retrieve variables for a specific grouppersonalized-variable.schema.js
insidepersonalized-variables
folder .packages/server/group/group.controller.js
for handling the API endpoints.[ ] Add new API endpoints under
/api/groups/:groupId/personalized-variables
to get, create, update and delete personalized variables. These endpoints will be accessible only to group admins, except for the GET endpoint which can also be accessed by regular users. insidepackages/server/group/group.routes.js
GET
/api/groups/:groupId/personalized-variables
- this endpoint will return all personalized variables associated with the specified group ID.POST
/api/groups/:groupId/personalized-variables
- this endpoint will be used to create a list of personalized variable or update a list in the specified group. The request body should contain the details of the personalized variable array to be created or updated (i.e., label and variable).DELETE
/api/groups/:groupId/personalized-variables/:variableId
- this endpoint will be used to delete a personalized variable from the specified group.[ ] Create a new service
personalized-variable.service.js
insidepersonalized-variables
which contain services for the diffrents endpointsFinally, how long will it take?
1-2 days