[FEATURE] transactionalPush: check options.customKeys against the app before deploy
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 74/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
Direzione di ricerca
Start with TransactionalPush.preDeployTasks and MobilePushApp.definition.js; trace how the app is resolved from the cache and where options.customKeys is validated before deployment. Check the existing transactional push tests and add cases for an unknown key, a non-string value, an uncached applicationId, and the unchanged happy path. Done when the app key mismatch and invalid value are handled as specified, while an uncached app and valid definitions still deploy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Background
A transactionalPush definition can carry custom keys in options.customKeys, a list of { "key": "...", "value": "..." }. Marketing Cloud checks that list against the MobilePush app the definition names (applicationId) and refuses the request when it does not fit. The messages it returns do not tell the user what to fix:
| Case | Answer of POST / PATCH /messaging/v1/push/definitions |
|---|---|
| a key that the app does not define | 404 FuelRuntime_ObjectNotFound: CustomKey(s) Not Found: <key> for application <applicationId> |
| a value that is a number instead of text | 400 MCMS_UTM_Runtime: Unknown runtime exception |
The first reads like a missing item although it is a mismatch between the definition and its app, and it shows the app's ID instead of its name. The second says nothing at all.
The first case is easy to run into when a definition is deployed to another business unit: the app is resolved by name there (r__mobilePushApp_name), and the app of the same name may define other custom keys.
mcdev already has what it needs
mobilePushAppis retrieved fromGET /push/v1/application, which lists the custom keys of each app askeys(an array of names; the property is missing for an app without custom keys).keysis part ofMobilePushApp.definition.js.TransactionalPush.preDeployTasksalready looks the app up in the cache to resolver__mobilePushApp_key/r__mobilePushApp_name.
Proposal
In TransactionalPush.preDeployTasks, after the app is resolved and before anything is sent:
-
Keys the app does not define. Compare every
options.customKeys[].keywith thekeysof the resolved app. If one is missing, stop the deployment of that item with a message that names the definition, the key(s), the app by name and ID, and the keys the app does define, for example:transactionalPush 'order_shipped': custom key 'Card_Theme' is not defined for mobilePushApp 'Customer App' (…id…) on this BU. Keys defined there: 'Order_Id', 'Deep_Link'. Add the key to the app in MobilePush Administration or remove it from options.customKeys.
If the definition carries a plain
applicationIdthat is not in the cache, the check cannot run; say so in a debug line and deploy as today. -
Values that are not text. Check that every
options.customKeys[].valueis a string. For a number or boolean either stop with a message that names the key and the value, or convert it to text and say so in a warning. Which of the two is for the maintainer to decide; converting is what the API seems to expect, since"5"is accepted where5is not.
Tests: a definition with an unknown key, one with a number as value, one with a plain applicationId that is not cached, and the unchanged happy path.
Tested
Seen on 2026-11-20 with an own test definition on a business unit with MobilePush, app with one custom key:
- create with one key of the app and one unknown key: 404 as above, nothing created
- create and change with a key of the app and a text value: 201 / 200,
options.customKeysreturned as sent - change with a number as value: 400 as above
- change that sends only
options.customKeys:options.soundis kept - change with an empty list: the property is removed from the definition
Not tested: whether a journey's push activity or a mobilePush message refuses custom keys in the same way.
- Lingua principale
- JavaScript
- Stelle
- 166
- Fork
- 50
- Merge medio
- 11h 4m
- PR unite (30g)
- 36
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Accenture/sfmc-devtools
-
e/DevOps enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
Accenture/sfmc-devtools#2795 ·
I maintainer di solito rispondono entro 1 giorno
-
c/INIT chore
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Accenture/sfmc-devtools#2793 ·
I maintainer di solito rispondono entro 1 giorno
-
bug c/Generic validationRule
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Accenture/sfmc-devtools#2794 ·
I maintainer di solito rispondono entro 1 giorno
-
bug c/automation
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Accenture/sfmc-devtools#2792 ·
I maintainer di solito rispondono entro 1 giorno
-
c/mobileMessage c/mobilePush c/transactionalPush c/transactionalSms enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Accenture/sfmc-devtools#2733 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Accenture/sfmc-devtools
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
Life-Framework/Life-Framework#7017 ·
I maintainer di solito rispondono entro 1 giorno
-
agent/guide documentation help wanted stage/010-actionable
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
kubestellar/console-kb#4003 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
FilOzone/synapse-sdk#1201 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue task
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
NSC-Tech-Hub/nscth-static-website#107 ·
I maintainer di solito rispondono entro 1 giorno