Error while trying out Destination SDK | Community
Skip to main content
Level 2
July 24, 2023
Solved

Error while trying out Destination SDK

  • July 24, 2023
  • 1 reply
  • 1486 views

Hi,

 

I am trying to create a custom Destination and I am following this documentation -

https://experienceleague.adobe.com/docs/experience-platform/destinations/destination-sdk/guides/configure-destination-instructions.html?lang=en. I was able to get the first step working and this was my output -

 

POST https://platform.adobe.io/data/core/activation/authoring/destination-servers

Body (as per tutorial) -

 

{ "name":"Moviestar destination server", "destinationServerType":"URL_BASED", "urlBasedDestination":{ "url":{ "templatingStrategy":"PEBBLE_V1", "value":"https://api.moviestar.com/data/{{customerData.region}}/items" } }, "httpTemplate":{ "httpMethod":"POST", "requestBody":{ "templatingStrategy":"PEBBLE_V1", "value":"insert after you create a template in step 3" }, "contentType":"application/json" } }

 

 

I got the following output -

 

{ "instanceId": "33d59348-0d31-4bf3-9e48-cde98f68b3c4", "createdDate": "2023-07-24T22:15:30.107338Z", "lastModifiedDate": "2023-07-24T22:15:30.107338Z", "imsOrg": "A729776A5245B1590A490D44@AdobeOrg", "sandboxName": "mcafee-dev-box-02", "sandboxId": "b19fad86-84a2-40ef-9fad-8684a220ef23", "name": "Moviestar destination server", "destinationServerType": "URL_BASED", "urlBasedDestination": { "url": { "templatingStrategy": "PEBBLE_V1", "value": "https://api.moviestar.com/data/{{customerData.region}}/items" }, "splitUserById": false }, "httpTemplate": { "requestBody": { "templatingStrategy": "PEBBLE_V1", "value": "insert after you create a template in step 3" }, "httpMethod": "POST", "contentType": "application/json" }, "qos": { "name": "freeform" } }

 

 

As per the instructions, I went to the next step -

POST platform.adobe.io/data/core/activation/authoring/destinations

 

{ "name":"Moviestar", "description":"Moviestar is a fictional destination, used for this example.", "status":"TEST", "customerAuthenticationConfigurations":[ { "authType":"BEARER" } ], "customerDataFields":[ { "name":"endpointsInstance", "type":"string", "title":"Select Endpoint", "description":"Moviestar manages several instances across the globe for REST endpoints that our customers are provisioned for. Select your endpoint in the dropdown list.", "isRequired":true, "enum":[ "US", "EU", "APAC", "NZ" ] }, { "name":"customerID", "type":"string", "title":"Moviestar Customer ID", "description":"Your customer ID in the Moviestar destination (e.g. abcdef).", "isRequired":true, "pattern":"" } ], "uiAttributes":{ "documentationLink":"http://www.adobe.com/go/destinations-moviestar-en", "category":"mobile", "connectionType":"Server-to-server", "frequency":"Streaming" }, "identityNamespaces":{ "external_id":{ "acceptsAttributes":true, "acceptsCustomNamespaces":true }, "another_id":{ "acceptsAttributes":true, "acceptsCustomNamespaces":true } }, "audienceMetadataConfig":{ "mapExperiencePlatformSegmentName":false, "mapExperiencePlatformSegmentId":false, "mapUserInput":false, "audienceTemplateId":"cbf90a70-96b4-437b-86be-522fbdaabe9c" }, "aggregation":{ "aggregationType":"CONFIGURABLE_AGGREGATION", "configurableAggregation":{ "aggregationPolicyId":null, "aggregationKey":{ "includeSegmentId":true, "includeSegmentStatus":true, "includeIdentity":true, "oneIdentityPerGroup":true, "groups":null }, "splitUserById":true, "maxBatchAgeInSecs":2400, "maxNumEventsInBatch":5000 } }, "destinationDelivery":[ { "authenticationRule":"CUSTOMER_AUTHENTICATION", "destinationServerId":"33d59348-0d31-4bf3-9e48-cde98f68b3c4" } ] }

 

 

As per instructions, I replaced the destinationServerId with instance Id obtained from output of the first step. However, I am getting an error when I run the second POST request -

 

 

{ "type": "http://ns.adobe.com/aep/errors/DEST-0001-400", "title": "Invalid parameter: invalid url field: http://www.adobe.com/go/destinations-moviestar-en", "status": 400, "report": { "tenantInfo": { "sandboxName": "mcafee-dev-box-02", "sandboxId": "b19fad86-84a2-40ef-9fad-8684a220ef23", "imsOrgId": "A729776A5245B1590A490D44@AdobeOrg" }, "additionalContext": { "imsUser": "D40F255163F45DEF0A495E53@techacct.adobe.com", "RequestID": "zPwe7rcu1GgldzeUbDnjx1IWrqthaTTA" } }, "error-chain": [ { "serviceId": "4511", "errorCode": "DEST-0001-400", "invokingServiceId": "c99e833759714f73ba8697d2218287eb", "unixTimeStampMs": 1690237898173 } ] }

 

 

I can see that the URL 

is not a valid URL, but how do I fix this? If the URL is defunct, what can I replace it with and how do I step further? OR have I missed any step that I had to do before running this POST request?
 
Thank you,
 

 

Best answer by sirisha_ganti

Thank you for response, that helped me proceed.

 

I had to make a few changes for the custom Destination -

1. Pattern was empty, so I had to set that to check for alphanumeric entries (that's our requirement) - 

{ "name":"customerID", "type":"string", "title":"Moviestar Customer ID", "description":"Your customer ID in the Moviestar destination (e.g. abcdef).", "isRequired":true, "pattern":"^[A-Za-z0-9_]+$" }

 

2. We don't need an audience template, but we definitely want mapping (ability to pick only a few attributes in audience and also hash them before sending to the Destination), so I had to set audienceMetadataConfig as follows -

"audienceMetadataConfig":{ "mapExperiencePlatformSegmentName":false, "mapExperiencePlatformSegmentId":false, "mapUserInput":true }

3. We need to encrypt the attributes in mapping, so I had to modify identityNamespaces as well

"identityNamespaces":{ "email":{ "acceptsAttributes":true, "acceptsCustomNamespaces":true, "transformation": "sha256(lower($))", "acceptedGlobalNamespaces":{ "Email":{ "requiredTransformation": "sha256(lower($))" } } } }

I was to able to create the custom destination and set up the connection (I chose the authentication to Bearer instead of OAuth2), but I still have a few issues -

 

1. After setting up the connection and adding an audience, I don't see the dataflow runs happening at all. Is this because the URL we are using above is defunct and not working?

2. I also don't see the apply transformation checkbox in Mapping step until I type "xdm:" in front of the mapping attribute

3. When I chose "transformationrequired" option in identitynamespaces for email, I don't see the name as "email_lc_256", is this because I haven't named that identity field as "email_lc_256"? I thought that was an autogenerated name.

 

My main concern is there are no runs happening in the dataflows. I have scheduled to the right time, but I don't see any data processed. Why is that?

 

1 reply

abinash_abns
July 25, 2023

This Part of code is used to categorize your Custom Destination in UI.

"uiAttributes":{ "documentationLink":"http://www.adobe.com/go/destinations-moviestar-en", "category":"mobile", "connectionType":"Server-to-server", "frequency":"Streaming" },

If you have any reference URL then you can use that or else remove that URL.

"uiAttributes":{ "documentationLink":"", "category":"mobile", "connectionType":"Server-to-server", "frequency":"Streaming" }
Level 2
July 25, 2023

Will keep you posted.