Genesys Cloud - Main

 View Only

Sign Up

  Thread closed by the administrator, not accepting new replies.
  • 1.  Extract Contact → Custom Data Action → Call User Flow

    Posted 07-20-2018 00:05
    No replies, thread closed.
    ​Hi All.

    Please follow the following matter.

    【What you want to realize】
    In accordance with the contents registered in "External contacts", I'd like to make a call to a specific operator.
    (Example: Register profiles of high-quality customers as "External contacts" → make incoming calls to specific superior operators with ANI as the key)

    【Implementation method】
    · Custom DataAction (below)
    -----------------
    - Contract(IN)
    -----------------
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Search External Contacts by Phone Number",
      "description": "A Phone Number based request.",
      "type": "object",
      "required": [
        "LOOKUPVAL"
      ],
      "properties": {
        "LOOKUPVAL": {
          "description": "The Phone Number.",
          "type": "string"
        }
      }
    }
    -----------------
    - Contract(OUT)
    -----------------
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Get User Routing Status Response",
      "description": "Returns Contracts-Data.",
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        }
      }
    }
    -----------------
    - Request
    -----------------
    {
      "requestUrlTemplate": "/api/v2/externalcontacts/reversewhitepageslookup?lookupVal=${input.lookupval}",
      "requestType": "GET",
      "headers": {
        "UserAgent": "PureCloudIntegrations/1.0",
        "Content-Type": "application/x-www-form-urlencoded"
      },
      "requestTemplate": "${input.rawRequest}"
    }
    -----------------
    - Response
    -----------------
    {
      "translationMap": {
        "contacts": "$.contacts[0].externalSystemUrl"
      },
      "successTemplate": "{\n   \"contacts\": ${contacts}\n}"
    }

    ⇒ In the data action test, the operator name enters the status.

    · Calling DataAction at Architect → transfer to user

    【Problem】
    In the DataAction test, the intended value is obtained, but Architect does not work as expected.
    (I did not recognize the return value of the data action as a user object(?))]

    ------------------------------
    Makoto Nagai
    Itochu Techno-Solutions Corporation(CTC)
    ------------------------------


  • 2.  RE: Extract Contact → Custom Data Action → Call User Flow
    Best Answer

    Posted 07-20-2018 10:03
    No replies, thread closed.

    Architect can't cast a string value to a User value.  One workaround is to use the parallel arrays approach explained here:

    https://help.mypurecloud.com/articles/convert-string-value-typed-value/

    The 2nd workaround is to use Transfer to Number action with the agent's phone number instead of Transfer to User. 



    ------------------------------
    Melissa Bailey
    Genesys - Employees
    ------------------------------



  • 3.  RE: Extract Contact → Custom Data Action → Call User Flow

    Posted 07-23-2018 09:21
    No replies, thread closed.
    It also appears your successTemplate output doesn't match up with your output schema. The schema used by Architect expects a field named "status":

    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Get User Routing Status Response",
      "description": "Returns Contracts-Data.",
      "type": "object",
      "properties": {
        "status": {
          "type": "string"
        }
      }
    }

    However your success template returns an object with a field named "contacts":
    {
      "translationMap": {
        "contacts": "$.contacts[0].externalSystemUrl"
      },
      "successTemplate": "{\n   \"contacts\": ${contacts}\n}"
    }

    You should be able to fix it like this:

    {
      "translationMap": {
        "contacts": "$.contacts[0].externalSystemUrl"
      },
      "successTemplate": "{\n   \"status\": ${contacts}\n}"
    }

    To help detect these kinds of errors, you can specify specific fields (like "status") as required in the output schema:
    https://cswr.github.io/JsonSchema/spec/definitions_references/

    If "status" is required and is not present in the response, the output schema fails validation in the Test.

    ------------------------------
    R. J. Smith
    Genesys - Employees
    ------------------------------



  • 4.  RE: Extract Contact → Custom Data Action → Call User Flow

    Posted 07-30-2018 05:47
    No replies, thread closed.
    ​Hi R. J. Smith.

    As you pointed out, there was a mistake in the response part.
    I corrected it together with the guidance of Melissa Bailey and it solved without problems.

    Thank you very much.

    ------------------------------
    Makoto Nagai
    Itochu Techno-Solutions Corporation(CTC)
    ------------------------------



  • 5.  RE: Extract Contact → Custom Data Action → Call User Flow

    Posted 07-30-2018 05:45
    No replies, thread closed.
    ​Hi Melissa Bailey.

    I am sorry that the reply became late, although I received your reply promptly.

    Problem solved in "The 2nd workaround".
    I taught you so much, so I will try challenging the "parallel arrays approach" as well.

    Thank you !!

    ------------------------------
    Makoto Nagai
    Itochu Techno-Solutions Corporation(CTC)
    ------------------------------