Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

How to keep the environment-related keys outside of the project

  1. Create a configuration new project titled “Configuration” within each environment (Dev, Stage, Prod).

    Image RemovedImage Added
  2. Open your Engage the Configuration project.

  3. Under Develop > Schema and create a new Schema and a name for it. In this example, we will name it “settings.” We will set it as a dynamic data with one field.

  4. Data > settings> create a content block called settings 

    You can add as many key values here as you want 

    The key is very important - we need to keep the same key across all environments 

  5. To use it, in Expd: 

    1. Inject > after 0.1 >

    2. Function node > Set Model > set the key to the schema key 

      Dynamic data node > program into the settings 

      Make sure the content name is the same 

      Add a debug to make sure it works 

  6. Write the function > Set to Global context > we recommend only one settings content so that it will only return one

  7. Now we can use it whenever we need to 

  8. Now we can test to see if it is working

  9. If you change the settings, it will only display if you deploy the global context again

  10. We do this in the engage project or in any projects because then it will move