Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Global / Project Variable

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 13, 2023

I'm looking for a recommendation on a way to best set up a "global" variable for a project.  Our scenario is as follows

  • Service Request project where Customers submit requests for a new integration
  • The ticket is created, and evaluated by the internal team and if doable they then assign it to another team to generate the quote and cost information
  • The quote is attached to the Jira ticket and the quote and cost information are captured in the ticket
  • The quote is then provided back to the customer to approve or reject 
  • If approved, we then take the quote (attachment) and cost information and create a Coupa requisition via a Web request in automation
  • Once the requisition is approved and PO cut, work can start

First Coupa Automation Rule (First Web request)

  • Trigger - transition

 Get a new bearer token (OAuth 2.0), which expires every 24 hours.

We request the new token and store it in a variable 

First Coupa Automation Rule (Second Web request)

We take the token stored in the variable and use it to make an API call to create the requisition in Coupa

Second Coupa Automation

  • Trigger - Schedule

Once the request is created, we then run another Web Reuqest to check the status of the requisition.   We do this as we need the PO# captured (AKA requisition has been approved) before the integration work can begin.

We need to generate a new bearer token as I can't take the token from the previous rule and use it in this second rule 

What I'm trying to resolve

In both automation rules, we are currently requesting to get a new bearer token.  ideally, I would like to use the same token until it expires.   In the scheduled rule i would have an if-else to check the web request status and if it comes back unauthorized, i then generate a new token. 

Since this is a bearer token, i didn't want to store it in a field within the system, but any recommendation or thoughts on how i could pass this token from the first automation rule to the second would be greatly appreciated. 

If there is a way to encode it and then decode it, I would be more open to storing it in a field. 

 

 

1 answer

1 accepted

2 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 14, 2023

Hi @Julian Governale 

You can't pass information used in a rule to another rule unless you store information within the system.

This field does not need to be on the screen and it could be just a text field.

Even based on you first sentence to set a global variable, to me this is you want to re-use a piece of information. This needs to be stored somewhere to get used globally.

Julian Governale
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 14, 2023

Yeah that is what i figured.  We do have a security aspect that they indicated we cant store it in the field.  Even though it won't be a screen, its searchable in a filter which was their concern since we use tools to move to data to different reporting tool.

Though the risk is very low since we can have that field excluded from going to the other tool, its not 100% safeguard.

Maybe ill make a feature request to Atlassian for a project variable within the automation tool to allow a consent variable to be reused within that project. 

Thanks @Marc - Devoteam for the response... love the user icon too!

Like Marc - Devoteam likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events