• Resolved techedge

    (@techedge83)


    Hi, we have written some code to apply a custom order state for “cod” payments. The order state is applied immediatley after the standard “processing” status (this is needed to trigger woocommerce confirmation emails without rewriting all the code).

    So it is:
    placed order->”processing”->”hold for cod confirmation”.
    There is a problem with the event “placed order”, however, because this is not sent to klaviyo until the order is put on “processing” again. It seems the event stays on a standby state until “processing” triggers sending. It should be a matter of seconds, because if we manually put it on “processing” for 5-10 seconds and then on “hold for cod confirmation” again the event is sent, while it isn’t sent if we switch states in less than 5 seconds. We could add a delay for the “hold for cod confirmation” status of 10-15 seconds after the placed order but since we don’t know exactly what it triggers event sending (and how much time it takes to send) we are not sure that this kinda solution could work.

    Our opinion is that there should be no need or reason to put event sending at standby if the order has been on “processing” at least once before. This could be useful for orders that start with this status, but other than this it should be considered a bug.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Scott (Klaviyo)

    (@scottklaviyo)

    Thanks for reaching out @techedge83 . Please contact our Support Team and they can help you configure your integration so Placed Order events will be recorded when the order status is "hold for cod confirmation" .

    Thread Starter techedge

    (@techedge83)

    Hi Scott and thanks for your reply. In the meantime I found a workaround by manipulating the payload sent by the webhooks (forcing “processing” in the state). Do you have a different solution?

    BTW, maybe there is a small issue with your webhooks because you have “order created” and “order updated” and it seems like they are sent with the same timestamp and sometimes their reception is reversed (I ran into the issue when I first edited the “order created” webhook and found that – coincidentally – on Klaviyo the result was not always recorded; then I also edited “order updated” and now it always gets the correct results).

    Finally, as a suggestion, I think you should add a filter for your webhooks (however I could not find where the payload is composed, so I don’t know if it is possible).

    Please feel free to ask for more details if you think I can give you a hand.

    Thanks.

    Plugin Support Scott (Klaviyo)

    (@scottklaviyo)

    Thanks for the reply @techedge83 .

    Yes, there is another solution. On the Klaviyo side of things, our Support Team can enable a setting for you that will ensure the "hold for cod confirmation" order status is treated as a Placed Order event.

    The webhooks subscribed to by Klaviyo’s integration are default WooCommerce webhooks. Klaviyo does not manipulate the payloads in any way. We treat the order.created and order.updated the same so there is no precedence.

    Thread Starter techedge

    (@techedge83)

    Ok, it’s all clear now and you were very kind to point out everything.
    Our solution is working nicely right now but we will contact the Support Team to discuss a better solution with them.

    Thanks again for your support.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Placed order event delayed?’ is closed to new replies.