09-08-2014
07:24 PM
- last edited on
03-25-2019
07:26 PM
by
ciscomoderator
Hey,
Looking for some help with getting the http trigger contact as a string variable.
I have a HTTP trigger application and I'm looking to trigger it from two different URLS I would then like to use the switch step to set different variables depending on the triggered contact.
I'm struggling to workout how to use the get trigger info step to retrieve the contact.
Thanks
Andrew
Solved! Go to Solution.
09-09-2014 04:15 AM
This is exactly what I meant.
Use the Get Trigger Info step and map a String variable to Name. Like this:
I have an application that maps two HTTP triggers to an application, mapped to a script, containing this step: /apple and /orange. If I call http://<ip>:9080/apple?color=green, the value of my variable named var would be apple, if I call http://<ip>:9080/orange?taste=sweet, the value of "var" is "orange".
G.
09-09-2014 02:54 AM
Hi,
I am not sure I can follow you but if you use the Get Trigger Info step and map the "Name" to a String variable, you shuld get the URL (or at least the significant part of it).
G.
09-09-2014 04:00 AM
Thanks for the reply Gergely,
I'll try to rephrase my question.
I have a URL I curl to uccx like this
http://uccx.com:9080/webcallback?name=Bart+Simpson&numberToCall=%2B5556424....
So I use the "get HTTP contact info" step to phrase out name and number to call to use later on in my script.
For my question I'd like to use two triggers for the same application
Example - /webcallback and /webcallback2
Within the application I'd like to use the "switch" step to set different variables based on if the request came from /webcallback or /webcallback2.
from ccx step guide I see "Get Trigger Info Step" which has contact:
"Contact - Contact object that triggered this script. If no contact triggered this script (for
example, when a designer is debugging a script), the returned value is null."
and
"You can use the Context tab to get the trigger parameters for use in other steps in the script."
But I'm not really sure how to do this
09-09-2014 04:15 AM
This is exactly what I meant.
Use the Get Trigger Info step and map a String variable to Name. Like this:
I have an application that maps two HTTP triggers to an application, mapped to a script, containing this step: /apple and /orange. If I call http://<ip>:9080/apple?color=green, the value of my variable named var would be apple, if I call http://<ip>:9080/orange?taste=sweet, the value of "var" is "orange".
G.
09-09-2014 04:45 AM
Thanks, I guess its the name: I was looking for and not the Contact:
:)
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide