Error in POST REST API via custom component in Oracle Digital Assistant
Summary:
Hi,
We have to POST REST API(including JSON payload) via custom component in Oracle Digital Assistant.
After uploading tgz file in custom component in ODA , variable mapping is not happening with JSON payload in java script.
Kindly help me on the same to proceed on the ODA bot development.
Content (please ensure you mask any confidential information):
'use strict';
const fetch = require('node-fetch');
// Hardcoded credentials for Postman Echo
const USERNAME = 'XXXXXX';
const PASSWORD = 'XXXXXXX';
const data =
{
"attribute1": "${fixed_val}",
"attribute2": "${greetings_id}",
"attribute3" : null,
"attribute4" : "${profile.firstName}${profile.lastName}"
};
module.exports = {
metadata: () => ({
name: 'run',
properties: {},
supportedActions: ['success', 'failure'],