Skip to main content
Solved

Custom Property being entered as list not date

  • October 3, 2024
  • 2 replies
  • 51 views

Forum|alt.badge.img

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"
  ]
}

 

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.

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

TimMartinHarvey
Problem Solver III
Forum|alt.badge.img+4

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.

 


Forum|alt.badge.img
  • Author
  • Contributor I
  • 3 replies
  • 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'.",