Skip to main content
Solved

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

  • 22 July 2024
  • 2 replies
  • 24 views

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 :) 

2 replies

Userlevel 4

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

Userlevel 1

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

Reply