FAQ: How do I reference delta date settings with handlebars syntax in a relative URI?

When building a handlebars expression for a relative URI, use the following syntax to reference delta date settings:

{{{encodeURI lastExportDateTime}}}

For example, here is a relative URI that would work as expected in a delta flow:

/api/v1/orders?updated_at_min={{{encodeURI lastExportDateTime}}}&page={{{export.http.paging.page}}}

For more information, see Handlebar expressions for date and time format codes.

Hi Tom,

I get "undefined" as a returned value for {{{encodeURI lastExportDateTime}}}, and no value at all for {{{lastExportDateTime}}} (that's probably the reason why the encodeURI function returns undefined). What can be the reason for this? I know that the flow has run before, so there should be a lastExportDateTime in the system.

Thanks in advance.

Kind regards,
Christoffer

Hi @christoffersinnbeck,

If your export is set to delta, then integrator.io automatically creates a field in your export data named "lastExportDateTime". Verify that your export is set to Delta. When you return to the Relative URI editor, you should see the field listed in the Resources available for your handlebars template section, if that still doesn't work for you, I would suggest you visit an office hours session or open a support ticket to identify the root cause of your specific situation.