I have 2 destinations Klaviyo and Intercom. In ord...
# support
t
I have 2 destinations Klaviyo and Intercom. In order to subscribe a user that we identify to the default list ID we've configured, the docs tell us to send a
subscribe: true
prop like this:
Copy code
rudderanalytics.identify('1235', { 'email': 'test_user@foo.com', properties: { subscribe: true } } )
This works great and gets the user added to Klaviyo. However, now we then tried to add Intercom as a destination we we are getting a 400 error:
Copy code
{
  "response": "{\"type\":\"error.list\",\"request_id\":\"004dg7kgn9885bte0cs0\",\"errors\":[{\"code\":\"nested_custom_attributes\",\"message\":\"Cannot submit an object as a custom attribute value\"}]}",
  "firstAttemptedAt": "2023-07-25T01:24:22.206Z",
  "content-type": "application/json; charset=utf-8"
}
This is the actual request to Intercom from the event explorer. Notice
subscribe
attribute that's nested:
Copy code
{
  "body": {
    "XML": {},
    "FORM": {},
    "JSON": {
      "email": "test_user@foo.com",
      "user_id": "1235",
      "custom_attributes": {
        "properties": {
          "subscribe": true
        }
      },
      "last_seen_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
      "update_last_request_at": true
    },
    "JSON_ARRAY": {}
  },
  "type": "REST",
  "files": {},
  "method": "POST",
  "params": {},
  "userId": "b7996d98-96cb-46da-8162-8dcb27f07d73",
  "headers": {
    "Accept": "application/json",
    "Content-Type": "application/json",
    "Authorization": "Bearer ******OjA=",
    "Intercom-Version": "1.4"
  },
  "version": "1",
  "endpoint": "https://api.intercom.io/users"
}
This seems strange to me that by default, an important attribute like
subscribe
is not automatically handled by Rudderstack in the translation for Intercom. Am I missing something or is the only ways around this to be: 1. Write a transformation to strip out any nested properties 2. call rudderstack's identify call twice, specifying different integrations on each, and modifying the props we send in each? #2 seems ridiculous, and #1 seems like something that should be automatically handled?
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
I would have to check on this and get back to you.
Hi Trevin, RudderStack makes minimal changes to the properties object of a destination. Most of the time the properties object is sent as is. Does the "subscribe" property have any significance for Intercom destination or is it being sent because the same event is sent to both the destinations? I guess at this point the best way forward would be to use a user transformation to add/remove the subscribe object based on your requirement.