Forum Discussion
GET call to backend API in canvas?
Hey Ashleedolan! Agreeing with Arso on this one that making a connected content call would be the best option.
For the Canvas setup, you could start with a 2-hour delay after entry. Then, add a user update step that pulls a value from a connected content call. If that value exists, you’d write it to the user’s profile as a custom attribute. From there, you can add a decision split step or audience path step looking for does the custom attribute = X? If yes, they go down Path 1; if no, they follow Path 2.
Thank you. There will actually be a few separate values that we are checking for - could I replace the decision split here with an audience path based on those custom attributes? For example:
- PeytonFNM2 months agoCollaborator
AshleedolanYes, absolutely! This will work!
- Ashleedolan31 days agoCollaborator
PeytonFNMAllanHeoFNMin the user update step, the docs say tokens/keys arent needed and shouldn't be added. Our endpoint currently requires the users JWT before accessing- can we still dynamically pass this in the header? It says not needed, but also doesn't clarify if you can still pass it if its required so I just want to be clear.
- PeytonFNM31 days agoCollaborator
The user update step doesn’t actually need headers. It’s basically a more efficient version of a webhook that sends data directly to Braze using their endpoints. I’d imagine that since it’s specifically designed to send requests to Braze endpoints only, either authentication is built-in, or it functions in a way that doesn’t require it.
Authenticating your backend is a different story, you can handle that within the connected content call instead. Braze has some examples on how to do this—here’s a link that walks through using basic authentication: Braze Docs.
In theory, you would start by making a Connected Content call to authenticate your backend, retrieve the data, and store it in variables if necessary. Then, you would have the JSON object through the advanced JSON editor to update user profiles. Here’s a general example.
Might even be worth throwing the connected content authentication aspect in a content block and then just calling the content block before the JSON.
AllanHeoFNMany other ideas in terms of an approach?- AllanHeoFNM30 days agoVisionary
Nope, bc you left no crumbs in that response!!! 💯
The Content Block is a great touch, and Peyton is correct that Connected Content is how you pull from your BE.
The notes about the User Update step not requiring headers is only relevant for Braze headers; the User Update step allows us to skip the Braze Authentication (Braze API key).
Related Content
- 12 months ago
- 2 years ago