shopifyGetOrders um discount_allocations erweitern

Hallo Synesty,

wir haben ein Problem beim shopifyGetOrders-Step. Da werden rabattierte Versandkosten nicht richtig übergeben. Allerdings ist das Feature auch nicht wirklich dokumentiert: Shipping lines discount allocations - Shopify Community

Ich benötige den discount_allocations-Knoten aus den shipping_lines bzw. shipping_lines_discount_allocations_amount.

Gruß David

Hallo @SWMH-david-conlabz,

ich habe gerade mal ein bisschen in unserem Testsystem rumgeklickt und ich bekomme es beim besten Willen nicht hin, dass in discount_aalocations etwas ausgegeben wird.
Kann du mir vielleicht erklären, was in Shopify gesetzt sein muss, dass das ausgegeben wird?

Viele Grüße
Lukas

Hallo @synesty-Lukas,

ich vermute euer Step shopifyGetOrders muss angepasst werden, da die Existenz des Knotens bei Shopify selbst nicht dokumentiert ist (siehe Link). Die Ausgabe vermisse ich ebenfalls :wink:

Gruß David

Hallo Lukas,

den Knoten discount_allocations benötige ich aus der Bestellung:

{
    "order": {
        "discount_codes": [
            {
                "type": "shipping",
                "code": "DANKE",
                "amount": "3.99"
            }
        ],
        "cancel_reason": null,
        "id": 3990708388045,
        "shipping_lines": [
            {
                "discount_allocations": [
                    {
                        "amount_set": {
                            "presentment_money": {
                                "currency_code": "EUR",
                                "amount": "3.99"
                            },
                            "shop_money": {
                                "currency_code": "EUR",
                                "amount": "3.99"
                            }
                        },
                        "discount_application_index": 0,
                        "amount": "3.99"
                    }
                ],
                "source": "Advanced Shipping Rules"
            }
        ]
    }
}

Gruß David

Hallo @SWMH-david-conlabz,

die shipping_line_discount_allocations werden nun in der Step Version 2022-10 mit ausgegeben.

Viele Grüße
Lukas

Hallo Lukas,

shopify hat sich dazu entschieden, dass Order nun ebenfalls das Feld discount_applications verpasst bekommt, welches der shopifyGetOrders-Step nicht ausgibt. Allerdings benötigen wir diesen bei der Rechungserstellung.

{
  "order": {
    "id": 6093747814667,
    "discount_applications": [
      {
        "target_type": "line_item",
        "type": "manual",
        "value": "16.99",
        "value_type": "fixed_amount",
        "allocation_method": "each",
        "target_selection": "explicit",
        "title": "NL",
        "description": "NL"
      }
    ],
  }
}

Gruß David

Hallo @synesty-Lukas,

gibt es eine Info, ob ihr das implementieren wollt?
Danke.

Gruß David

Hallo @SWMH-david-conlabz,

die Spalte discount_applications wird jetzt im Step GetOrders Version 2024-01 mit ausgegeben.

Viele Grüße
Lukas