We have a campaign launching that will be pushing data into a custom object. In the past (before I was with the company), we had them come in through one field via JSON string and then parsed out in velocity. We can still do that OR push the info into fields within the custom object. Here are examples of the fields we would create and then push them to:
I personally think it's easier to push this data into individual fields because it makes it "cleaner" and because it's less work on the velocity side. Just curious if there's a best practice for this? A colleague of mine thinks we should just push to one field and parse it out in velocity but I'm not entirely sure why. Is my approach just lazy?
If I did go the route of a one JSON string, can I get some direction or opinions on how should I parse this out in velocity?
Solved! Go to Solution.
The reasons to use JSON in textarea fields — and I say this as the person who pioneered the approach! — are:
It doesn’t sound like you match any of these cases, so I would go with individual fields.
The reasons to use JSON in textarea fields — and I say this as the person who pioneered the approach! — are:
It doesn’t sound like you match any of these cases, so I would go with individual fields.
Thank you! That was very helpful.
Question - we are going to be using a JSON text area field for another campaign (I wrote in about the other day). There may be some properties that come in as blank ... does that break anything? For instance if we use this structure:
"subject line" : "value1",
"proofpoint" : "value2",
"oppy ID" : "value3"
and the subject line comes in blank.
As long as it comes in as an actual JSON empty string ""
that’s completely fine.