Assigning a Customer to a Distribution Group

Since we have introduced so called distribution groups in our sending chain (refer to the Distribution Groups Concept) we can simply assign a specific distribution group to a specific customer. So we can provide necessary resources for customers as well as punish customers by putting them on a specific group which exists in order to prevent bad influence on "well behaving" customers (customers who - for example - do not cause delays on the sending chain by consuming all of the resources we have, using invalid certificates, …​).

Currently we have 4 distribution groups:

  • default: The group which is assigned to every customer who has no special setting

  • runtastic: A own group for our customer Runtastic so do not add any other customer ID here without an agreement from product management.

  • dg01: Currently used for the customer betclic accounts (replaced a former hack) and 2 test accounts

  • dg02: Is a distribution group for bad behaving customers like istegelsin (sending with invalid certs), allegro (blocking the RDS queues) and others.

Step by Step

  • If not already given to you, as for the ID of the customer either from the one who requested the change or ask Hubot on Slack if you decided this on your own.

  • Open the configuration editor for the message generator by

    • executing gap-cli config:edit -a me-msg-generator -n mobile-engage and then

    • selecting the proper environment (staging or production)

  • Look for the environment variable DISTRIBUTION_GROUPS. The content of it looks like this

DISTRIBUTION_GROUPS='{"runtastic": [645781705], "dg01": [210268110,767116266,2273,767989879,794521575], "dg02": [799943121,286609404,568240517,784581168]}'
  • Add the ID of the customer to the proper array.

  • Save the change and tell the script to apply the changes which will cause an output like this:

-DISTRIBUTION_GROUPS='{"runtastic": [645781705], "dg01": [210268110,767116266,2273,767989879,794521575], "dg02": [799943121,286609404,568240517]}'
+DISTRIBUTION_GROUPS='{"runtastic": [645781705], "dg01": [210268110,767116266,2273,767989879,794521575], "dg02": [799943121,286609404,568240517,784581168]}'
  • Add a note regarding the config change to the #mobile-release channel.

  • Update the JIRA ticket with information about the changes you did if there is one.