Skip to content
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

Added support for contact tokens for url in Send a webhook campaign action #6494

Open
wants to merge 2 commits into
base: staging
from

Conversation

Projects
None yet
3 participants
@kuzmany
Copy link
Contributor

kuzmany commented Aug 27, 2018

Please be sure you are submitting this against the staging branch.

Q A
Bug fix?
New feature?
Automated tests included?
Related user documentation PR URL
Related developer documentation PR URL
Issues addressed (#s or URLs)
BC breaks?
Deprecations?

Description:

This PR added to Send a webhook campaign action (#4357) support for contact token in url.

PR use case based on slack conversation
https://mautic.slack.com/archives/C02HU8BUT/p1533624667000200

Steps to test this PR:

  1. Well. Try setup Send a webhook campaign action.
  2. Add contact token to url (see example)

image

  1. Check If url was replace with token data (need dev skills)

@kuzmany kuzmany added this to the 2.15.0 milestone Aug 27, 2018

@kuzmany kuzmany added Enhancement and removed Bug labels Aug 27, 2018

@kuzmany kuzmany changed the title Added support for contact tokens in Send a webhook campaign action Added support for contact tokens for url in Send a webhook campaign action Aug 28, 2018

@npracht npracht added this to To do in Testing 2.15.0 Oct 16, 2018

@AlbanL74fr

This comment has been minimized.

Copy link

AlbanL74fr commented Nov 10, 2018

Hi @kuzmany,

I tested this PR according to different use cases I could think and one of them didn't work. I tested only for the POST method, btw.

For my tests, I have found useful to use the https://webhook.site in order to check if the webhooks were sent or not.

The test URL was : https://webhook.site/e02dc6fe-db1b-4872-ba7b-f4ef09ef5f33
For convenience, I used the hash e02dc6fe-db1b-4872-ba7b-f4ef09ef5f33 as the value for my token.

  1. Test Case 1 (Worked) : Create a contact field, set manually e02dc6fe-db1b-4872-ba7b-f4ef09ef5f33 as the field value from a contact profile.

image

image

  1. Test Case 2 (Worked) : Create a contact field and use e02dc6fe-db1b-4872-ba7b-f4ef09ef5f33 as the fallback value in to token inserted in webhook url such as https://webhook.site/{contactfield=webhook_hash_1|e02dc6fe-db1b-4872-ba7b-f4ef09ef5f33}

image

It worked. But I had to adjust the webhook timeout to a higher value or I wouldn't receive all of them (I eventually set 60 seconds.

image

  1. Test Case 3 (Didn't work) : Create a contact field and use e02dc6fe-db1b-4872-ba7b-f4ef09ef5f33 as the default value

image
I can see that the value is set properly in contacts as soon as the contact field is created
image

But the webhook is never sent when the campaign is launched, and there is an error in the contact view
image

@kuzmany

This comment has been minimized.

Copy link
Contributor Author

kuzmany commented Nov 10, 2018

@can you retest point 3 again? Doesn't make sense. Thanks

@AlbanL74fr

This comment has been minimized.

Copy link

AlbanL74fr commented Nov 11, 2018

@kuzmany OK, I tried again. It worked well for all test cases this time. Thanks

@kuzmany kuzmany moved this from To do to Tested once in Testing 2.15.0 Nov 11, 2018

@AlbanL74fr

This comment has been minimized.

Copy link

AlbanL74fr commented Dec 4, 2018

Anyone else to test this? It's a great enhancement for "send a webhook" feature. I described an easy way to test it aswell.

@Woeler Woeler modified the milestones: 2.15.0, 2.16.0 Dec 5, 2018

@Woeler Woeler removed this from Tested once in Testing 2.15.0 Dec 5, 2018

@heathdutton heathdutton added this to Code Review (2 required) in Mautic 2 Dec 6, 2018

@heathdutton heathdutton removed this from Code Review (2 required) in Mautic 2 Dec 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.