-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Punchh Dynamic Code Generation liquid #7828
Conversation
replacing liquid as previous liquid was not generating correctly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @alex-braze , most everything here looks good, but I noticed that most of the {% raw %}{% endraw %}
tags were moved, which were breaking your test deployment. Just for a little background:
If you have any Liquid on a docs page, the docs site will try to execute that code as if its real Liquid. To avoid this, you need to wrap it in raw tags, like this:
{% raw %}
```liquid
https://SERVER_NAME.punchh.com/request_coupons/DYNAMIC_COUPON_GENERATION_TOKEN?sign={{jwt}}
```
{% endraw %}
Or like this:
To link to a Puncch-hosted web page, add the Dynamic Generation URL provided in Punchh Campaign creation UI and replace `GENERATED_SIGNATURE` with `{% raw %}{{jwt}}{% endraw %}`:
Hope this helps! Please let me know if you have questions. You can select Add Suggestion to Batch for each suggestion I left (you have to do this from the Files tab), then commit them all at once to update the page 👍🏽
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Outdated
Show resolved
Hide resolved
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Show resolved
Hide resolved
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Outdated
Show resolved
Hide resolved
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Show resolved
Hide resolved
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Show resolved
Hide resolved
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Show resolved
Hide resolved
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Show resolved
Hide resolved
Co-authored-by: isaiah robinson <95643215+internetisaiah@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a couple of comments and one suggestion, but after that, we should be good to go 👍🏽 @alex-braze
|
||
You could then leverage [Connected Content]({{site.baseurl}}/user_guide/personalization_and_dynamic_content/connected_content/making_an_api_call/) to insert the code as plain text into any message body. For example: | ||
|
||
{% raw %} | ||
```liquid | ||
{% connected_content https://SERVER_NAME.punchh.com/request_coupons/DYNAMIC_COUPON_GENERATION_TOKEN.json?sign={{jwt}} :save punchh_coupon %} | ||
{% connected_content https://example.punchh.com/request_coupons/XXXXXXXXXXXXX.json?sign={{jwt}} :save punchh_coupon %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its ok if we change the variable names from the original, but lets make sure that these are descriptive variables instead of example
or XXXXXXXXXXXXX
. Additionally, the variable should be all caps (as that is apart of our style guide).
|
||
{% raw %} | ||
```liquid | ||
<img src="https://SERVER_NAME.punchh.com/request_coupons/DYNAMIC_COUPON_GENERATION_TOKEN.png?sign={{jwt}}">` | ||
``` | ||
<img src="https://example.punchh.com/request_coupons/XXXXXXXXXXXXX.png?sign={{jwt}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its ok if we change the variable names from the original, but lets make sure that these are descriptive variables instead of example
or XXXXXXXXXXXXX
. Additionally, the variable should be all caps (as that is apart of our style guide).
_docs/_partners/message_orchestration/channel_extensions/loyalty/punchh/code_generation.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Reverted the 11111
variable back to DYNAMIC_COUPON_GENERATION_TOKEN
to keep it uniform with the earlier content + ensure that the variable is a descriptive name. Gonna merge and should be good for next deploy tomorrow 👍🏽 Thanks for working quick with me on this 🙌🏽
@internetisaiah quick heads up! We had to change the original URL because it is no longer the DYNAMIC_COUPON_GENERATION_TOKEN that is included in the URL! This URL has to be pulled from the Punchh dashboard and does not include the token in it. |
Ah, what about |
I'm hesitant to add any variable in that spot specifically because technically the entire dynamic generation URL would be a variable being replaced, but it's kind of confusing to just show this: DYNAMIC-GENERATION-URL{{jwt}} Here's where it is referenced in their docs: |
@alex-braze , ahh i think i'm understanding your concern now. how's this instead? placeholder values have been replaced with an actual example instead. |
@internetisaiah LOVE IT!!! |
Summary
We found out during live testing on a call with Punchh today that our liquid was out of date and wasn't working.
Related PRs, issues, or features (optional)
Feature release date (optional)
Contributor checklist
Submitting for review
If your PR meets the above requirements, select Ready for review, then add a reviewer:
braze-inc/docs-team
as the reviewer.braze-inc/docs-team
instead.Thanks for contributing! We look forward to reading your work.