AnsweredAssumed Answered

Tokenising json field in Marketo

Question asked by Andrew Cho on Dec 5, 2017
Latest reply on Dec 6, 2017 by Sanford Whiteman

Hi all,

 

Forgive me  if this is the incorrect place to post!

 

Background note:

We are wanting to pull from a custom field in an custom object

We work in a peer to peer system where the lead can be (customer and seller)

Basically long story short, we have a field called 'jsonProduct' which I know is currently filled with info such as

 

    "id":
    "booking_id": 
    "total_tax_inclusive": 
    "total_tax_exlusive": 
    "tax": 
    "duration": 
    "rate_type": 
    "type": 
    "code": ,
    "name": 
    "supplier": 
    "price": 
    "quantity":
    "explanation": "
    "currency": ",
    "country": "
    "data": 

 

 

and so on! I understand that I need to be using velocity to pull these out from the field.

 

I have been following this guide below

Link here

 

#if( ${Bookings2_cList.get(0).jsonProduct}).isEmpty() )
#set( ${Bookings2_cList.get(0).jsonProduct} = '[]' )
#end
#set( $jsonProduct = '#set( $jsonProduct = ' + (${Bookings2_cList.get(0).jsonProduct}) + ' )' ) 
#evaluate( $jsonProduct )


===

 

I have written something similar (I understand copying it won't necessarily work) however I have tried a lot of different ways and syntax to go around it and also seem to find it hard to find documentation in finding the solution to this problem. It is probably fairly simple fix and I am just not possibly looking hard enough however I was hoping maybe some of you could point me in the correct direction Or may know the solution!

 

Thank you so much!

Andrew

Outcomes