Reserved keywords in Webhook Responses

The templating language we use in the platform Jinja2 has a limitation when used with our web framework, Django. Because of the way that Jinja2's attribute lookup system is designed, it decides to not ignore built-in functions that it should ignore. Because of this, there are some reserved keywords that we do not recommend using in the parsing rules.  

In this article, we will cover:

Keywords users should not include

Here, we will address the keywords users should not include in their Webhook Response parsing rules. Any path with the format "xxxx.yyy" that uses any of the reserved tokens below may present issues and should be avoided:


If you are already using these reserved tokens, then we recommend that you edit them and use the suggested format shown in the example below.

We had a customer who used the following keywords in their parsing rules. There's nothing inherently wrong with the format used here, but because the customer is using the reserved token "items" in the path for extracting the custom variables, it results in no custom variables being created.

"marketplaceOrderState": "{{marketplaceOrderState}}",
"trackingNumber": "{{shipments[0].items[0].tracking[0].trackingNumber}}",
"handlingOrder1": "{{shipments[0].items[0].action}}"

A solution to circumvent this issue

There is a way to circumvent this issue while using the reserved tokens, but it requires changing the format of the path used. This is the format that we recommend when using the reserved tokens in the list above:

"trackingNumber": "{{shipments[0]['items'][0].tracking[0].trackingNumber}}",
"handlingOrder1": "{{{shipments[0]['items'][0].action}}",
"marketplaceOrderState": "{{marketplaceOrderState}}"

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Please sign in to leave a comment.