If wanting to try the examples below, the following general steps would have to done first.
- Create a connector project (see Creating Connector Project).
- Create the integration project (CIC Project).
- Set dependency of the connector project in the integration project.
The steps below demonstrate how several operations can be performed using the AMP SP-API connector Business Processes and Schemas.
Example 1: SubmitFeed
- Prepare request payload to invoke CreateFeedDocument Connector BP using a Ruleset. For more information on the request please refer to the Amazon documentation in this link.
- Use JSON - Get to fetch feedDocumentId from the response returned by CreateFeedDocument Connector BP.
- Use JSON - Get to fetch URL from the response returned by CreateFeedDocument Connector BP.
- Construct a feed in a StorageNode format. For more information on the request, please refer to Amazon documentation in this link.
- Invoke SubmitFeed Connector BPby passing:
- feedContent - (created in step 4)
- MarketPlaceIdList - create a list by adding all the marketplaceIds that you want the feed to be applied to, and then convert to a string using Set Value, as shown here.
- feedType - https://developer-docs.amazon.com/sp-api/docs/feed-type-values
- url - (captured in step 3)
- feedDocumentId - (captured in step 4)
Example 2: GetFeedSubmissionResult
- Invoke the GetFeed Connector BP specifying the feedId value.
- Parse the response to check the processingStatus. When the feed moves into the DONE state, proceed to the next step to retrieve the Feed Document.
- Use JSON - Get to fetch resultFeedDocumentId from the response returned by the GetFeed Connector BP.
- Invoke the GetFeedSubmissionResult Connector BP by passing the resultFeedDocumentId from the previous step as the value for feedDocumentId parameter to retrieve the feed processing report.
Example 3: GetReportContent
- Invoke the GetReport Connector BP, specifying the feedId value.
- Parse the response to check the processingStatus. When the status moves into the DONE state, proceed to the next step to retrieve the Report. At this point, the response includes a reportDocumentId value if there is report data available.
- Use JSON - Get to fetch reportDocumentId from the response returned by the GetReport Connector BP.
- Invoke the GetReportContent Connector BP by passing the reportDocumentId from the previous step as the value for the reportDocumentId parameter (to retrieve the report).
Comments
0 comments
Please sign in to leave a comment.