-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Items stored incorrectly in Drip for cart or order endpoints #80
Comments
@noctivityinc Can you say more about how you'd like to use the objects in the You can loop over the objects in the array like this:
That will show the names of each product. You can also access items by index like this:
That will show the name of the first product in the array. |
@iantance ok take a look a this. The items object in Drip for this one user is this:
Then I try to use Drip's email editor: But when I preview it for that user, look at what I see: So basically the data from the item's object is not being used to populate the email correctly, indicating something is wrong somewhere. |
@iantance also, what is this |
@noctivityinc Sorry, that should have been When previewing an email, there's no event around for us to use when rendering the email. So you won't see liquid that uses The exception is that we do include some sample data when previewing our abandoned cart blocks. We pull some cart events randomly from your account to populate the items, but as you noticed they will not correspond to a particular subscriber. I believe that's what you are seeing in that last screenshot. In general, those abandoned content blocks aren't using the data from the event you see in the UI (they don't use |
Then how exactly do we test this?
…On Wed, Aug 17, 2022 at 8:03 PM Ian Nance ***@***.***> wrote:
@noctivityinc <https://github.com/noctivityinc> Sorry, that should have
been event.items.
When previewing an email, there's no event around for us to use when
rendering the email. So you won't see liquid that uses event render in
previews.
The exception is that we do include some sample data when previewing our
abandoned cart blocks. We pull some cart events randomly from your account
to populate the items, but as you noticed they will not correspond to a
particular subscriber. I believe that's what you are seeing in that last
screenshot.
In general, those abandoned content blocks aren't using the data from the
event you see in the UI (they don't use event.items). They are hitting a
separate service to pull the most recent version of the card, based on the
cart_id in the triggering event.
—
Reply to this email directly, view it on GitHub
<#80 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAATIAVI5POMYF2LW6I22E3VZV4ULANCNFSM562WNYEA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
If your workflow is turned on, you could test it live by make an API call to simulate the initial cart event. |
When using the
create_cart_activity_event
orcreate_order_activity_event
and passing an array of items, which is basically an array of ruby hashes, as per the API documents to drip, they are not stored as an object and, as such, we can't properly use them in our emails. When I try to use them in an abandon template, for example, all the wrong data is pulled.How do we pass an item array to CORRECTLY store in Drip? Here is an example of how the data is recorded and you can clearly see that the Items field is simply a dump of the Ruby Hash, not a reusuable object. I also tried passing an array of JSON objects but the response said that it was expecting an object to be passed, which doesn't make a lot of sense.
The text was updated successfully, but these errors were encountered: