The Foxy API allows for robust e-commerce automation, enabling the connection between your storefront and various back-end systems. With this API, you can automate tasks such as order processing, inventory management, and customer communication. Utilize this functionality to streamline your e-commerce operations, reduce manual effort, and enhance customer satisfaction by ensuring timely updates and actions.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
foxy: {
type: "app",
app: "foxy",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.foxycart.com/reporting`,
headers: {
Authorization: `Bearer ${this.foxy.$auth.oauth_access_token}`,
"FOXY-API-VERSION": `1`,
},
})
},
})
Order Processing Workflow: When a new order is placed via Foxy, trigger a Pipedream workflow to validate the order data, then automatically create an invoice using QuickBooks or Xero. Follow up by sending a personalized confirmation email to the customer with details about their order.
Inventory Management Workflow: Set up a Pipedream workflow that triggers when stock levels change in Foxy. The workflow could adjust inventory counts in a connected warehouse management app like ShipStation and update the stock status on your storefront. This ensures accurate inventory levels across all platforms and prevents overselling.
Customer Follow-Up Workflow: Create a Pipedream workflow that initiates when an order is marked as shipped in Foxy. Use this trigger to send a shipping confirmation email to the customer with tracking information, and schedule a follow-up email asking for a review or offering a discount on their next purchase, fostering customer loyalty.
Foxy uses OAuth authentication. When you connect your Foxy account, Pipedream will open a popup window where you can sign into Foxy and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Foxy API.
Pipedream requests the following authorization scopes when you connect your account:
client_full_access
user_full_access
store_full_access
GET
https://my.foxycart.com/authorize
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
POST
https://api.foxycart.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
POST
https://api.foxycart.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}