App Connect

App Connect

Join this online user group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#Applicationintegration
#App Connect
#AppConnect
 View Only
  • 1.  F lows for API - Building response object dynamically

    Posted Wed July 29, 2020 10:25 AM
    Hi,

    In flows for API -the GET method, after the Request/Input I have added an "If" branching which connects to SAP or Salesforce based on one of the Input parameters. Since the result from each of the branches is different, how can I combine them to build a common response object? Please refer the image attached.

    Regards,
    Sirisha


    ------------------------------
    Sirisha Sharon Nethala
    ------------------------------


  • 2.  RE: F lows for API - Building response object dynamically

    Posted Thu July 30, 2020 12:49 AM
    Well I have a hard time understanding your question. From your design document it looks like, per request, you're only ever executing one branch. So if you want a common response object, I would suggest that each branch holds a mapping of the branch's response to that common response object. However, there will be no combining of the responses. For this you would need to execute both branches...

    ------------------------------
    Francois Brandelik
    ------------------------------



  • 3.  RE: F lows for API - Building response object dynamically

    Posted Thu July 30, 2020 06:41 AM
    Hi Sirisha
    Are you restricted to work with the web based version of App Connect?
    you could call an SAP API which converts the SAP Output into the common response object.
    And a Salesforce API which converts the Salesforce Output into the common response object.
    ( separate flows need to provide these APIs )
    You might also be able to work with something like JSON Parser or XML Parser to transform the SAP/Salesforce Output into common response object.

    ------------------------------
    Matthias Jungbauer
    ------------------------------



  • 4.  RE: F lows for API - Building response object dynamically

    Posted Fri July 31, 2020 07:04 AM
    Could you tell me how I can insert a an array of objects into Salesforce?
    I tried using JSONata format to specify the index and also used for each loop, but it isn't working.

    I want to create a new record for each of the array object.

    Attached is the API flow and model for reference.



    ------------------------------
    Regards,
    Sirisha Sharon Nethala
    ------------------------------



  • 5.  RE: F lows for API - Building response object dynamically

    Posted Mon August 03, 2020 07:06 AM
    When configuring any of the actions on the `ForEach` branch, you should be able to map from that specific invoice `Item`.



  • 6.  RE: F lows for API - Building response object dynamically

    Posted Mon August 03, 2020 07:06 AM
    Sirisha,

    The configuration panel for the `if` construct has an  `output schema` section where you can define the common schema for all branches.

    Each branch has an `output data` section where you can define a mapping for that branch onto the common schema. 



  • 7.  RE: F lows for API - Building response object dynamically

    Posted Wed August 12, 2020 02:35 AM
    Thank you John.

    ------------------------------
    Sirisha Sharon Nethala
    ------------------------------



  • 8.  RE: F lows for API - Building response object dynamically

    Posted Fri September 11, 2020 10:18 AM
    Hi @Sirisha Sharon Nethala
    did you find the answers that you are looking for?



    ------------------------------
    Matthias Jungbauer
    ------------------------------