cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YDdecs
Frequent Visitor

Creating HTTP reuqest flow

Hi Gents,

 

I am a bit stuck on the steps to build flow for the following scenario:

3rd party App sends request ->Http request received -> Parse Json -> from CDS on Model-Driven App need to get Contact -> then need to list the POs for this contact -> Response to the http request.

How this flow should look like? I am actually stuck on the Variable step after the Parse.

If anybody can make some input, it will be much appreciated. In the meantime I proceeding with the research.

Thanks!

6 REPLIES 6
Rahber
Super User II
Super User II

FROM CDS on Model Driven App net to Get Contact.

So you would probably used a CDS connector

list records.PNG

From here you can specify the entity behind model driven app and get the result from that entity .

 

Then you will follor your steps to get hte POs for that contact if its same in CDS you will use the same action but don't forget to pass the Query

 

Please accept the post as solution if it resolved your problem or please up vote if it helped you in anyway
Thanks,
Rahber

fchopo
Super User II
Super User II

Hello @YDdecs 

Probably we need more information in order to help you. Which is the JSON you are receiving (contact id, for example)? Which should be the format of your response (JSON, but which fields do you need to return)?

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
YDdecs
Frequent Visitor

Hi @fchopo @Rahber ,

 

Thanks for the prompt responce.

@Rahber, i figured the CDS connector step as well that needs to be used, but don't really have idea how to handle it. What do you mean by "don't forget to pass the Query"

@fchopo, the Request JSON is :

 

 

[
  {
    "_id": "randomNumbersandLetters",
    "userid3rdPartyApp": "Numbers",
    "operation": "01requestpos"
  }
]

 

 

And response JSON is:

 

 

[
  {
    "_id": "randomNumbersandLetters",
    "userid3rdPartyApp": Numbers,
    "operation": "02returnpos",
    "ponumbers": [
      {
        "id": 0,
        "purchaseordernr": "{PO-111111111}",
        "purchaseorderguid": "ak3g0-ewn0g-lkodv-fdg3e-oguud"
      },
      {
        "id": 1,
        "purchaseordernr": "{PO-222222222}",
        "purchaseorderguid": "ak3g0-ewn0g-lkodv-fdg3e-oguud"
      }
    ]
  }
]

 

 



 

 

So checking by userid3rdPartyApp in CDS, from there matching the Contact which is related to another field, which field basically filters what info to be displayed, then lists the POs for this userID and responds back to userid3rdPartyApp.

Thank you!

PS:
When I place the Response function in the flow, I receive the below message which i cannot figure out , as well cannot find similar in the web:

YDdecs_0-1593025269201.png

 

YDdecs
Frequent Visitor

I created the following Flow, but first i am unsure weather it is correct and second it doesn't work..... 🙃

YDdecs_0-1593029032529.png

As well upon saving , I receive the following error:

YDdecs_1-1593029071484.png

Where I didn't loop the Variable, it was created automatically....

 

Really stuck now.... LoL

Hello @YDdecs 

You can avoid the for each loop if you get the first element of the JSON input parameter:

 

flow.png

After that, you will have your contact information.

Hope it helps!

Ferran

 

 

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!
YDdecs
Frequent Visitor

@fchopo,
thanks for the input, unfortunatelly for now i will remake the flow as i found that the Json schema is not proper.
What you have mentioned helps eliminate the for each loop , but the outputs  is with wrong syntax.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (30,413)