Coder Social home page Coder Social logo

Comments (3)

AntoineAugusti avatar AntoineAugusti commented on June 16, 2024 1

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.

jidicula avatar jidicula commented on June 16, 2024

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.

AntoineAugusti avatar AntoineAugusti commented on June 16, 2024

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.

image

from notification-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.