Skip to main content
Contributor I
October 3, 2024
Solved

Custom Property being entered as list not date

  • October 3, 2024
  • 2 replies
  • 138 views

I want to use a custom property to set a date that a lapsed client email will be sent out. We calculate a lapsed date based on each clients order frequency. That field gets updated into the future every time a client places an order.

I have a segment set to filter anyone who’s LapsedDate = Current Date and a flow set up to trigger the start when someone enters that segment.

My problem is that the date is being entered as a list not a date so it isn’t being picked up by the segment. How do I get the data entered as a date? 

Here is the payload - 

{
"data": {
"type": "profile",
"id": "XXXXXXXXXXXXXX",
"attributes": {
},
"properties": {
"LapsedDate": "2024-10-03"
},
"meta": {
"patch_properties": {
"append": {
"LapsedDate": "2024-10-03"
}
}
}
}
}

This is what I am getting back

"properties": {
"MailChimp Rating": 2,
"MarketSegment": "Corporate Other",
"LapsedDate": [
"2024-10-03"
]
}

 

    This topic has been closed for replies.
    Best answer by TimMartinHarvey

    Hey @Pminich

    Hope youre doing well, 

    I think this is due to you using ‘Append’ rather than ‘Set’.
    Using Append would add it to an array, rather than set which should overwrite.

     

    2 replies

    TimMartinHarvey
    Problem Solver IV
    2025 Champion
    October 3, 2024

    Hey @Pminich

    Hope youre doing well, 

    I think this is due to you using ‘Append’ rather than ‘Set’.
    Using Append would add it to an array, rather than set which should overwrite.

     

    Tim Martin-Harvey | Head of E-Commerce | Digital Transformation Specialist | Multi-Brand E-Commerce Expert | 2024 & 25 Klaviyo Community Champion | Luminia Intelligence Top 10 Influential People in UK Wholesale E-Commerce
    PminichAuthor
    Contributor I
    October 3, 2024

    I thought append was a little odd myself but there is not set option. When you try that you get

    "status": 400,

    "code": "invalid",

    "title": "Invalid input.",

    "detail": "'set' is not a valid field for the resource 'profile'.",