Passing calculated field values in the Journey Optimizer custom SMS provider payload using metadata.custom
When you use a custom SMS provider in Adobe Journey Optimizer, you may need to send extra fields to the provider, such as a customer ID number or a unique message ID. Their values come from profile attributes or journey context properties. This article explains why these fields can arrive empty and how to pass them with the metadata.custom node.
Description description
You define extra fields in the provider payload of the SMS API credential. Standard fields such as message, fromNumber and toNumber are populated. Your custom fields reach the provider empty, or the expression is not resolved at journey runtime. This happens even when you take the attribute paths from the message editor and add them directly to the payload. The payload editor has a personalization icon but offers no attributes to select. The public documentation says custom fields are possible but does not describe how to populate them from calculated values.
Resolution resolution
At the moment the personalization of the payload is not available in the Journey Optimizer out of the box and the solution proposed below is a workaround.
- In the message authoring UI, use the
metadatanode in the message content. Under it, map each field name to the profile attribute or journey context expression that supplies its value:
{
"message": "Hi {{profile.person.name.firstName}}",
"metadata": {
"customerIDNumber": "{{profile.<your_attribute_path>}}",
"messageUnique": "{{context.journey.technicalProperties.currentNodeId}}"
}
}
- In the SMS API credential, edit the provider payload. Reference each value as
metadata.custom.<fieldName>:
{
"fromNumber": "{{fromNumber}}",
"messageTemplate": "<template_id>",
"toNumber": "{{toNumber}}",
"message": "{{message}}",
"customerIDNumber": "{{metadata.custom.customerIDNumber}}",
"messageUnique": "{{metadata.custom.messageUnique}}"
}
- Publish the journey and send a test message.
- Verify the payload with your sms provider. Confirm that
customerNumberandmessageUniquearrive populated.
The field names in both steps must match exactly. Only valid Journey Optimizer expressions are substituted. Placeholder text is sent as is or arrives empty.