Original Message:
Sent: 04-17-2024 14:54
From: Adesh Jadhav
Subject: Genesys Cloud Integration with Mulesoft (Web Service data intergration)
Thank you, Richard.
I have created an auth action, which gives me the below result, but I'm still confused about how to create subsequent actions to fetch the actual information. I'm sorry, but I'm quite new to the Genesys world.
------------------------------
Adesh Jadhav
Orange SA
Original Message:
Sent: 04-17-2024 09:24
From: Richard Schott
Subject: Genesys Cloud Integration with Mulesoft (Web Service data intergration)
In neither case should your token be specified as an input to the action; the token is either something that will be created by the auth auction and leveraged in your subsequent actions using the authResponse velocity template namespace (see https://help.mypurecloud.com/articles/how-to-use-the-user-defined-oauth-credential-type/), or the token is something that is assembled as part of the basic auth credential type in the header of the action.
Which option you choose is going to be determined by the API you're connecting to; if that API requires a bearer token, then you'll need to use the custom oauth, which will need your credentials associated with the integration to hit the authorization endpoint specified by the vendor to return the token, which will then be referenced in your subsequent data action.
------------------------------
Richard Schott
Genesys - Employees
Original Message:
Sent: 04-16-2024 03:42
From: Adesh Jadhav
Subject: Genesys Cloud Integration with Mulesoft (Web Service data intergration)
Thanks Robert for your response.
- When tried Basic auth .. i'm getting error "No authentication bearer token specified in authorization header"
- When tried to use User defined oAuth integration action execute but its gives me null results.
I have attached both integration actions code below
- Basic Auth Action
{ "name": "Get Account info-Basic Auth (MuleSoft) B2B GLO Germany - Exported 2024-04-16 @ 13:05", "integrationType": "custom-rest-actions", "actionType": "custom", "config": { "request": { "requestUrlTemplate": "https://dev-apint.bat.net/bat-e-md2b-sf-petra-d/v1/contacts?endMarketISO=DE&phoneNumber=09628914600", "requestType": "GET", "headers": { "Authorization": "Bearer ${input.access_token}" }, "requestTemplate": "${input.rawRequest}" }, "response": { "translationMap": {}, "translationMapDefaults": {}, "successTemplate": "${rawResult}" } }, "contract": { "input": { "inputSchema": { "type": "object", "properties": { "access_token": { "type": "string" } }, "additionalProperties": true } }, "output": { "successSchema": { "type": "object", "properties": {}, "additionalProperties": true } } }, "secure": false}
2. User defined oAuth action
{ "name": "Get Account info-oAuth (MuleSoft) B2B GLO Germany - Exported 2024-04-16 @ 13:05", "integrationType": "custom-rest-actions", "actionType": "custom", "config": { "request": { "requestUrlTemplate": "https://dev-apint.bat.net/bat-e-md2b-sf-petra-d/v1/contacts?endMarketISO=DE&phoneNumber=09628914600", "requestType": "GET", "headers": { "Authorization": "Bearer ${input.access_token}" }, "requestTemplate": "${input.rawRequest}" }, "response": { "translationMap": {}, "translationMapDefaults": {}, "successTemplate": "${rawResult}" } }, "contract": { "input": { "inputSchema": { "type": "object", "properties": { "access_token": { "type": "string" } }, "additionalProperties": true } }, "output": { "successSchema": { "type": "object", "properties": {}, "additionalProperties": true } } }, "secure": false}
------------------------------
Adesh Jadhav
Orange SA
Original Message:
Sent: 04-15-2024 20:23
From: Robert Wakefield-Carl
Subject: Genesys Cloud Integration with Mulesoft (Web Service data intergration)
Did you setup an integration for the Basic or Oauth and then place the token received in the request header? What is the disabled output you are getting? What error are you getting in the data action?
------------------------------
Robert Wakefield-Carl
ttec Digital
Sr. Director - Innovation Architects
Robert.WC@ttecdigital.com
https://www.ttecDigital.com
https://RobertWC.Blogspot.com
Original Message:
Sent: 04-12-2024 10:17
From: Adesh Jadhav
Subject: Genesys Cloud Integration with Mulesoft (Web Service data intergration)
Hi Team,
I'm trying to create Web service data action integration for Mulesoft endpoint to fetch the customer information.
I tried different ways to build the different authentication method , basic auth & user defined oAuth but nothing seems to work. I tried using postman & its work without any issue.
Attaching the postman collection json below... could someone help me with right approach to build Genesys cloud data action & integration ?
{
"info": {
"_postman_id": "b8efdf78-7607-4a44-b933-4a9ecc11de00",
"name": "DEV: Contacts-Genesys",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "33285836"
},
"item": [
{
"name": "Generate token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var data = pm.response.json();\r",
"pm.collectionVariables.set(\"access_token\", data.access_token);"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "basic",
"basic": [
{
"key": "password",
"value": "xxxxxxxxxxxxxx",
"type": "string"
},
{
"key": "username",
"value": "xxxxxxxxxxxxx",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"url": {
"raw": "https://xxxxxxxxxxxxxxx",
"protocol": "https",
"host": [
"dev-apint",
"bat",
"net"
],
"path": [
"bat-p-c4ev2-oauth2-t",
"v2",
"oauth2",
"token"
],
"query": [
{
"key": "grant_type",
"value": "client_credentials"
}
]
}
},
"response": []
},
{
"name": "Contacts_by_phoneNumber",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "xxxxxxxxxxxxxxx",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
"raw": "https:// xxxxxxxxxxxxxxxxxxxxxxxxxx",
"protocol": "https",
"host": [
"dev-apint",
"bat",
"net"
],
"path": [
"bat-e-md2b-sf-petra-d",
"v1",
"contacts"
],
"query": [
{
"key": "endMarketISO",
"value": "DE"
},
{
"key": "phoneNumber",
"value": "xxxxxxxxx"
},
{
"key": "",
"value": "",
"disabled": true
}
]
}
},
"response": []
}
],
"variable": [
{
"key": "access_token",
"value": ""
}
]
}
#Integrations
------------------------------
Adesh Jadhav
Orange SA
------------------------------