if (typeof value === 'string' && value.startsWith('$')) {
const [intent, field] = value.substr(1).split('.');
if (isMultiIntent && multiIntentData.includes(intent)) {
obj[key] = multiIntentData
.flatMap((intentName) => {
const actionDataArray = getActionData(intentName, processedData);
return actionDataArray.map((actionData) => actionData[field])
.filter((fieldValue) => fieldValue !== undefined && fieldValue !== null);
})
.join(', '); // Adjust based on how you want to concatenate values
} else {
// Single intent logic
// ...
}
} else if (key === 'items' && Array.isArray(value)) {
// Handle array of items for multi-intent scenario
// ...
}
bulk SMS Service provider in delhi
Our SMS services include promotional SMS, transactional SMS, OTP SMS, voice SMS, and customized marketing campaigns. With an easy-to-use dashboard and smart automation tools,…