Legacy Dev Forum Posts

 View Only

Sign Up

Data Dip request/Response question

  • 1.  Data Dip request/Response question

    Posted 06-05-2025 18:40

    GenesysCommunity | 2016-06-08 17:19:16 UTC | #1

    I was able to get MyPureCloud to call my web service but I did not get any data from the call and when I hardcode the response, the app does not seem to like it.

    How the data is passed to the web service?

    Is the JSON below in the correct format for the response?

    Thanks

    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Contact", "description": "", "type": "object", "required": ["Contact"], "properties": { "Contact": { "type": "object", "description": "A Contact", "required": ["Id"], "properties": { "EmailAddresses": { "type": "object", "description": "Email Addresses of the Contact", "required": ["EmailAddress"], "properties": { "EmailAddress": { "type": "array", "description": "Array of Email Addresses of the Contact", "items": { "type": "object", "properties": { "EmailAddress": { "type": "string", "description": "Email Address of the Contact" }, "EmailType": { "type": "integer", "description": "Type of Email Address" } } } } } }, "FirstName": { "type": "string", "description": "North East" }, "LastName": { "type": "string", "description": "Last Name of the Contact" }, "FullName": { "type": "string", "description": "Full Name of the Contact" }, "Id": { "type": "string", "description": "ID of the Contact" }, "PhoneNumbers": { "type": "object", "description": "Phone Numbers of the Contact", "required": ["PhoneNumber"], "properties": { "PhoneNumber": { "type": "array", "description": "Array of Phone Numbers of the Contact", "items": { "type": "object", "properties": { "Number": { "type": "string", "description": "Phone Number of the Contact" }, "PhoneType": { "type": "integer", "description": "Type of Phone Number" } } } } } }, "Address": { "type": "object", "description": "Address of the Contact", "properties": { "City": { "type": ["string", "null"], "description": "City of the Address" }, "Country": { "type": "string", "description": "Country of the Address" }, "Line1": { "type": ["string", "null"], "description": "Line 1 of the Address" }, "Line2": { "type": ["string", "null"], "description": "Line 2 of the Address" }, "Line3": { "type": ["string", "null"], "description": "Line 3 of the Address" }, "PostalCode": { "type": ["string", "null"], "description": "Postal Code of the Address" }, "State": { "type": ["string", "null"], "description": "State of the Address" }, "Type": { "type": ["integer", "null"], "description": "Type of Address" } } }, "CustomAttribute": { "type": ["string","null"], "description": "The value of the custom attribute provided in the request" } } } } }

    GenesysCommunity | 2016-06-08 17:19:26 UTC | #2

    Your web service needs to support these contracts https://developer.mypurecloud.com/api/bridgeserverconnectors/webservice-datadip/service-contracts.html

    So if you were going to implement GetAccountByAccountNumber, the body of data that would be passed into your web service would look like

    {
      "AccountNumber": "",
      "CustomAttribute": ""
    }

    and your response would need to look like

    {
      "Id": "",
      "Name": "",
      "Number": "",
      "EmailAddresses": "",
      "PhoneNumbers": "",
      "Addresses": "",
      "CustomAttribute": ""
    }

    system | 2017-08-28 19:24:37 UTC | #3


    This post was migrated from the old Developer Forum.

    ref: 38