How to tie a generate label webhook request back to the 3PL?

Hi,

I am using the generate label webhook to integrate as a carrier for a 3pl. In the payload of the webhook, the account_id returned seems to be the account id of the 3pl’s customer, not the 3pl itself. Is there a way to identify the 3pl itself, and not the 3pl’s customer from the webhook request?

Thanks!

Hey @yash,

Thanks for reaching out!
Just wanted to let you know I’m actively looking into this one.

Best,
RayanP

Hey @yash,

Thanks for your patience!

Unfortunately, I don’t believe it’s possible to change the response of the generate label webhook. What’s the use case here, maybe I’d be able to offer an alternative.

Let me know if there’s anything I can do to assist.

Best,
RayanP

Hey @Rayanp,

Thanks for the update. The use case is that we need to bill the 3PL directly, and for that we were hoping to connect an incoming webhook label request to the 3PL’s account id. Currently we only get the 3PL’s customer’s account id, so we would have to manually create a mapping between each customer’s account id, and each parent 3PL account, to determine which 3PL the order was coming from, which would not be ideal.

I’m also open to first subscribing to the order allocated webhook, and then connecting that to the generate label webhook if possible using the API.

Open to any suggestions/ideas!

Yash

Hey @Rayanp, any updates on this?

Hey @yash,

I’ve passed the feedback of adding the 3PL Account ID to the generate label webhook along to the team.

For the time being we can probably get you set up to the order allocated webhook but I don’t believe there’s a way to connect that to the generate label webhook through the API. I’m still looking into it but I’m unsure if there’s a suitable alternative at the moment.

Let me know if you have any questions or concerns, or if there’s anything I can assist with.

Best,
RayanP

Hey @Rayanp, thanks for your reply.

What would the workflow look like if we subscribed to order allocated webhook?

Yash

Hey @yash,

After your client registers the order allocation webhook in their account. Every time an order is allocated the webhook would fire to the set endpoint and send something similar to this:

{
    "webhook_type": "Order Allocated",
    "allocation_reference": 362137624,
    "account_id": 6334,
    "account_uuid": "QWNjb3VudDo2MzM0",
    "warehouse_id": 11790,
    "warehouse_uuid": "V2FyZWhvdXNlOjExNzkw",
    "allocated_at": "2021-07-24T02:03:01",
    "order_number": "MO351",
    "order_id": 204159062,
    "order_uuid": "T3JkZXI6MjA0MTU5MDYy",
    "partner_order_id": "MO351",
    "line_items": [
        {
            "id": 550365415,
            "item_uuid": "TGluZUl0ZW06NTUwMzY1NDE1",
            "partner_line_item_id": "MO351-301706334",
            "quantity": 1,
            "sku": "1122335364",
            "is_kit_component": false,
            "created_at": "2021-07-24T02:03:01"
        }
    ]
    "ready_to_ship": 1
}

In your case as the most logical thing would be that you have access to the endpoint.

For more information check out article on webhooks here.

Let me know if you have any questions or concerns.

Best,
RayanP

Hi Ryan,

Does the account_id in your example refer to the 3pl or to one of the 3pl’s stores?

Yash

Hey @yash,

Thanks for hanging in there!

The account_id refers to the child account and their store. Like we discussed earlier it doesn’t look like there’s any way to get the 3PL Account ID from our webhooks. I didn’t realize that was the reason you were trying to register the order allocation webhook, sorry about that confusion.

Let me know if there’s anything at all I can do to assist.

Best,
RayanP

Ahh I see, thanks for the update. At this point the only solution I can think of is to maintain a mapping on our end from a child account_id to the parent 3PL. This is error prone as each time we add a new 3PL or a 3PL adds a new customer, this config would have to be updated. Do you know how soon we’ll find out if the 3PL Account ID can be added to the generate label webhook?