SOLVED

How to get custom object value properly displayed in my.token

Go to solution
Vlada_Prasolova
Level 5

How to get custom object value properly displayed in my.token

i have a custom object with a field that i want to send to our internal system from marketo via Webhook

i have created my.token based on this custom object

{{my.domain}} = ${co_space_domainList.get(0).domainName} (srcipt)

and i have added this {{my.domain}} token to the webhook

Vlada_Prasolova_0-1598451447466.png

the problem is that marketo seems to be unable to resolve the script and send the value of the token, instead i'm simply getting the the part of the token as-is:

...

/services/marketo/space/%7B%22codeBlock%22%3A%22%24%7Bco_space_domainList.get%280%29.domainName%7D%22%2C%22scriptingObjects%22%3A%7B%22custom%22%3A%7B%221026%22%3A%7B%22label%22%3A%22Space+Domain+Info%22%2C%22fields%22%3A%7B%223616%22%3A%7B%22label%22%3A%22Domain+Name%22%7D%7D%7D%7D%7D%7D

 

is there a work around this issues? are there any other ways to get custom object value as token/ any other field that can be sent in a webhook?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: How to get custom object value properly displayed in my.token

Velocity {{my.tokens}} aren't usable in webhooks.

 

The only ways to pass CO data to a remote service are

 

  • have a webhook loop back and retrieve COs via the API (heavy on API calls, may be acceptable under low load)
  • send an email to an SMTP processing app which parses the body and forwards it to the next service (very scalable, asynchronous, complex to set up)

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: How to get custom object value properly displayed in my.token

Velocity {{my.tokens}} aren't usable in webhooks.

 

The only ways to pass CO data to a remote service are

 

  • have a webhook loop back and retrieve COs via the API (heavy on API calls, may be acceptable under low load)
  • send an email to an SMTP processing app which parses the body and forwards it to the next service (very scalable, asynchronous, complex to set up)

View solution in original post

Vlada_Prasolova
Level 5

Re: How to get custom object value properly displayed in my.token

Thank you for your idea. I knew it's probably not possible to resolve scripts in custom tokens but i had hoped 😉

I will probably have to find some workaround this issue on the receiving end of the service

thank you again for your help!