Skip to main content
Solved

webook - is it possible to assign a value to an attribute during the send/receive data step?


The use case is:

I want to create a personalised promocode that is a random generated number during the campaign and send it through email

I am doing this:

  1. Create the webhook step. In the request I create the random number (promocode)
  2. In the response I receive a confirmation (I just receive 200 OK, not the promocode)
  3. I want to send the promocode through an email on the same campaign

I got stuck because I can/know to store the generated promocode and then retrieve it during the email step. I tried to assign a profile attribute during the request, but I couldn’t. I tried use the response attributes, but the variable used in the request is not there. 

Please help :) 

Best answer by Felix

Hey Tomas, 

You will have to make sure that your promocode is in the response. This will be set by the other systems that creates the code. Since I don't know which tool you are using, I am afraid I can't help you there. 

 

You can save the response of the webhook as an attribute value by clicking on the "response" tab in the webhook setup and use e.g. {{response.promocode}} to save it. If you haven't seen the docs yet here is a link on how to do that.

 

Hope that helps, 

Felix

View original
Did this topic help you find an answer to your question?

2 replies

Felix
  • Novice
  • 223 replies
  • Answer
  • July 23, 2024

Hey Tomas, 

You will have to make sure that your promocode is in the response. This will be set by the other systems that creates the code. Since I don't know which tool you are using, I am afraid I can't help you there. 

 

You can save the response of the webhook as an attribute value by clicking on the "response" tab in the webhook setup and use e.g. {{response.promocode}} to save it. If you haven't seen the docs yet here is a link on how to do that.

 

Hope that helps, 

Felix


  • Author
  • Novice
  • 6 replies
  • July 23, 2024

The API that creates promocode it’s a third party so not so easy. I will have to do a workaround then. Thanks


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings