TheDMSGroup / mautic-contact-client

Create custom integrations without writing code, like having your own Zapier.
GNU General Public License v3.0
95 stars 33 forks source link

how to handle nested json response? #243

Open rchen9012 opened 4 years ago

rchen9012 commented 4 years ago

Hi,

I am trying to match the response from Eventbrite which is a nested json. and also unable to handle pagination in response.

{ "pagination": { "object_count": 5, "page_number": 1, "page_size": 50, "page_count": 1, "has_more_items": false }, "attendees": [ { "team": null, "costs": { "base_price": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "eventbrite_fee": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "gross": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "payment_fee": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" }, "tax": { "display": "HK$0.00", "currency": "HKD", "value": 0, "major_value": "0.00" } }, "resource_uri": "https://www.eventbriteapi.com/v3/events/827538913/attendees/15573903/", "id": "1557273903", "changed": "2019-11-20T07:30:12Z", "created": "2019-11-20T07:30:12Z", "quantity": 1, "variant_id": null, "profile": { "first_name": "ond", "last_name": "cn", "email": "test@yahoo.com", "name": "test test", "addresses": {} }, "barcodes": [ { "status": "unused", "barcode": "115996298357273903001", "created": "2019-11-20T07:30:13Z", "changed": "2019-11-20T07:30:13Z", "checkin_type": 0, "is_printed": false } ], "answers": [], "checked_in": false, "cancelled": false, "refunded": false, "affiliate": "oddtdteb", "guestlist_id": null, "invited_by": null, "status": "Attending", "ticket_class_name": "General Admission", "delivery_method": "electronic", "event_id": "82753488913", "order_id": "1159962983", "ticket_class_id": "145585857" },

heathdutton commented 4 years ago

I'm not sure how you would handle pagination (depends on what you are trying to accomplish). But if you click Advanced and then check Manual Template you can put in your hierarchical JSON.

heathdutton commented 4 years ago

Sorry, I missread. For a response, if you run a test you can get nested json response data for field mapping. Pagination is not supported, because this is intended to update one contact. I'm not sure what you are trying to do there.