Skip to main content

Aggregate multiple records into a single API request

Comments

7 comments

  • Scott Henderson CTO
    Answer Pro
    Top Contributor

    You need to use the universal HTTP connector to submit batches of records.  See pic below for context.  It it not trivial to rebuild the Magento 2 connection and import bubbles using raw HTTP, but it is doable, and then you will have total control over the HTTP request payloads.

    0
  • Philippe Foisy
    Engaged
    Awesome Follow-up

    Thx Scott Henderson for this insight

    Does this connector support any notion of pagination? The total number of records will vary from time to time as the Shopify Merchand might add/remove products. Hypothetically, If I have 39 products, including 10 records per request, will the connector automatically proceed to 4 requests? 

    Regards 

    0
  • Scott Henderson CTO
    Answer Pro
    Top Contributor

    Yeah, the connector will automatically convert 39 records into 4 requests.

    0
  • Philippe Foisy
    Engaged
    Awesome Follow-up

    Oh ! That is most excellent ! Ok, will try that out ! Thx again Scott Henderson :)

    0
  • Philippe Foisy
    Engaged
    Awesome Follow-up

    Good afternoon Scott Henderson, can you provide assistance in debugging this "issue" ? Whenever I set the field "Number of records per HTTP request" to a value other than 1 (ex : 2 or 10) and try to save the import, this error pops in.


    If I revert the field value to 1, everything is saved alright

     

    Thanks in advance

    0
  • Scott Henderson CTO
    Answer Pro
    Top Contributor

    This looks like an annoying UI bug, but with a simple work around.  See pic below.  If you set this field, and click save, and then unset it, and click save again, then it should work.  You might actually need to use this field BTW.  I am not sure what the response structures look like for Magento 2, but this is a pretty commonly used field for when the results are wrapped by a variable.

    0
  • Philippe Foisy
    Engaged
    Awesome Follow-up

    That little workaround worked ! What a way to end a day ! Thx Scott Henderson

    0

Please sign in to leave a comment.