intercom-dotnet icon indicating copy to clipboard operation
intercom-dotnet copied to clipboard

Sending dates as custom_attribute

Open robfarmergt opened this issue 9 years ago • 3 comments

What is the correct way to send a custom_attribute so that Intercom recognizes it as a date? I've tried Unix timestamp as an int as well as a DateTime object but intercom shows the integer value or datetime json string respectively.

robfarmergt avatar Jan 11 '17 18:01 robfarmergt

@robfarmergt I believe that you need to make sure that the attribute name ends with _as as well.

edblankenship avatar Jan 11 '17 23:01 edblankenship

HI @robfarmergt Yeah, if your custom attribute ends with '_at' we will treat it as a timestamp. You can find out more from our API ref page here I will close this for now but please re-open if you are still having issues with this. Thanks Cathal

choran avatar Aug 29 '17 12:08 choran

I can't get this to work! Any pointers?

 company.custom_attributes["Salesforce Sync At"] = DateTimeOffset.UtcNow.ToUnixTimeSeconds();

DanOrsborne avatar Feb 06 '25 08:02 DanOrsborne