Bring Customer Data in via Webhooks by Zapier Action – Custom Request Event
The below instructions describe how to use a third party app as a Zapier Trigger and post transactions from that third party to your database using the Webhooks by Zapier Action/Custom Request Event. This option is the most flexible in terms of what data you can bring in but it does require JSON. Before you start you will need some information from Omeda to access our API. Please reach out to Omeda Support and they will provide you with the following:
Your company’s brand abbreviation
The product ID/s your form should use
The API key and input id
What you’ll need to get started:
Create your Trigger in Zapier. The Trigger will be where you want data to be sent from based on a certain event.
To create the Action, select the Webhooks by Zapier app in the app search. Select Custom Request as the Event.
Select Post from the Method drop down to send data from your Trigger to our database via the API.
In the URL field, you will use the url of our Save Customer and Order API.
For Production, use: https://ows.omeda.com/webservices/rest/brand/{brandAbbreviation}/storecustomerandorder/*
For Testing, use: https://ows.omedastaging.com/webservices/rest/brand/{brandAbbreviation}/storecustomerandorder/*
Make sure to add the brand abbreviation we provided.Select False from the Data Pass-Through? dropdown.
In the Data field, you will need to add the JSON you will be sending via the API.
For some of the fields you may use the data from your Trigger and for some you will hard code into your JSON.:
For a standard form, for example, where you might pass a product subscription, email information, and address information you can use the following JSON as a base.
{
"FirstName":"",
"LastName":"",
"PromoCode":"",
"Addresses":[
{
"RegionCode":"",
"AddressProducts":"",
"Street":"",
"PostalCode":"",
"City":"",
"CountryCode":""
}
],
"Products":[
{
"OmedaProductId":0
}
],
"Emails": [{
"EmailProducts": "",
"EmailAddress": ""
}]
}
You should hard code some of these fields in advance like the PromoCode and the various product fields. Use the product ID provided by Omeda in all three product fields listed (this will associate your email address and address information with the product).
For my example, I can also set the CountryCode, because I know that all my users will be domestic.
{
"FirstName":"",
"LastName":"",
"PromoCode":"TEST",
"Addresses":[
{
"RegionCode":"",
"AddressProducts":"0",
"Street":"",
"PostalCode":"",
"City":"",
"CountryCode":"USA"
}
],
"Products":[
{
"OmedaProductId":0
}
],
"Emails": [{
"EmailProducts": "0",
"EmailAddress": ""
}]
}
See the related Knowledge Base API Documentation for more examples on how to format your JSON or reach out to Omeda Support for assistance here.
Set where the form’s fields should map.
I’ll copy the above JSON into Zapier, and for the FirstName field, I’ll click within the quotation marks, then select “Insert a Field” in the top right of the box.
When I click, all my form fields with my test data will be listed at the bottom of the box.
For each of my form fields, I’ll select the form field until all fields have been populated.
Select “no” from the Unflatten dropdown.
Nothing is required in the Basic Auth field.
In the Headers section you must add the “x-omeda-inputid” and the “x-omeda-appid”. These will have been provided by Omeda.
10. Click “Test this Step”. Zapier will inform you if your transaction is successful. If so, reach out to your Omeda contact to see if they have received your test transaction.
11. Name your zap, and turn it on.
Table of Contents