How to pass object value as input in data action

Hi team,

My client needs to trigger an email when no agents are on queue. To implement this, I decided to go with Agentless email notification API https://developer.genesys.cloud/devapps/api-explorer#post-api-v2-conversations-emails-agentless.

Could you please help me on how to pass this object input to the API is

{
"senderType": "Outbound",
"fromAddress":
{
"email": "GenesysCorp@PJITest.pure.cloud",
"name": "GenesysCorp@PJITest.pure.cloud"
},
"toAddresses":
[
{
"email": "gowthami16796@gmail.com",
"name": "Gowthami"
}
],
"subject": "Test_Corp",
"textBody": "Need testing confirmation"
}

.

You should setup a Genesys Cloud Data Action. When you create the action, part of the configuration as input to the API with the POST body where you can use the body you have above. You can leave it all hardcoded for the initial test, but then parameterize everything using the contract input fields.

Hi Crespino,

I craeted a data action and loaded the configuration in the body. I have two doubts in this solution,

  1. How to parameterize object values like email and name, using contract input field.
  2. I ran the above body and got this error below. Please note that I have already created email domain of type Genesys cloud.

{
"message": "The requested resource was not found.",
"code": "not.found",
"status": 404,
"messageParams": {},
"contextId": "a8be8980-34bb-4d32-82ef-f010f68a92f4",
"details": [
{
"errorCode": "ACTION.REMOTE_ENDPOINT"
}
],
"errors": [
{
"message": "REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"The outbound domain does not exist","code":"postino.error.not.found","status":404,"messageWithParams":"The outbound domain does not exist","messageParams":{},"contextId":"51575f91-5d84-47ea-ba0c-d6afa87bf3b8","details":[],"errors":[]} [a8be8980-34bb-4d32-82ef-f010f68a92f4]",
"code": "NOT_FOUND",
"status": 404,
"messageParams": {},
"details": [],
"errors": []
}
]
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.