cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1653
Views
10
Helpful
4
Replies

Http Trigger - Get Contact as string

Andrew Grech
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

4 Replies 4

Gergely Szabo
VIP Alumni
VIP Alumni

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.

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

 

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.

Thanks, I guess its the name: I was looking for and not the Contact:

 

:)

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: