Comments (3)
Hi @jidicula,
The behaviour you described in your question is currently a feature but I agree it may be misleading, let me explain how it works at the moment. When you create templates on Notify and then send notifications using the template UUID, the latest version of the template will be used. This is convenient if you have a "stable" template and you want to tweak some wording, without changing variables. This becomes an issue, as you experienced, if you use the same template in various environments and you add/delete/update variables. The API responds with a 400 if you're missing personalisation data, that's expected: all personalisation keys are required.
Do you recommend using separate templates for each environment they may be used in?
I think that it may be a safer bet for you. At the moment the API does not let you pin down the version when specifying a template (you would need to pass the template UUID + the template version). To avoid breaking your production code when you're looking at changing your templates, it may be easier to differentiate templates between staging and production. You could use folders for that. You would have different template UUIDs between staging and production, you could change these values using environment variables.
I'm sorry you experienced this behaviour the hard way and that your production environment failed because of that. We plan to work more on templates in the coming months and we'll make sure this is properly documented in the technical documentation and in the UI if you add/delete/update personalisation keys.
I'll pass on your feedback to our Product team for consideration.
from notification-api.
Thanks @AntoineAugusti! No need to apologize - this was a mistake on our end in how we were using the product. We'll set up different templates for each environment to prevent running into this pitfall again.
I'll leave it to you to decide if you want to close this issue, but from my end I have the information I need. Thanks again!
from notification-api.
The Notify app warns you when you add/update/delete variables on the UI but it's easy to miss. We'll improve that in the future.
from notification-api.
Related Issues (20)
- Clean up old providers from the codebase
- 500 when switching language after creating an SMTP relay
- Move the email address used for DMARC reports to a config variable HOT 1
- Create a security.txt file for vulnerability disclosure practices HOT 4
- Replace moment.js
- Static assets caching
- Not possible to accept an org invite: KeyError blocked
- Update AWS Lambda for DB snapshots to secondary account
- Remove new user tour totally from code
- Fix npm run webpack
- API endpoint for data download from dashboard HOT 3
- Different psycopg error message in (failed) test HOT 5
- Error in tests (IntegrityError): The email address ((sending_email_address)) is not able to receive messages HOT 2
- Change the name of the branch in all notify repos to 'main' HOT 6
- Support x-www-form-urlencoded data to API url
- Refactor alerts to distinguish between infrastructure failure, capacity, or service limits HOT 5
- Getting the status of Bulk Notifications HOT 2
- Dependency Dashboard
- Not all notifications showing up on the api HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notification-api.