The Shopify order line will create one total sales record. Multiple total sales records will be created if an order has multiple order lines.
GF Job Log will be automatically created once the order is created on Shopify.
An Apex class
GF_OrderCreatedEvent
is exposed as a REST resource, and maps to the URLhttps://
{instance}.salesforce.com/services/apexrest//OrderCreatedEvent
The Total Sales record will be automatically created when the Shopify order is pushed to the GF Job Log table.
Once the Total Sales record is created for the job log, the Processed field will be checked.
The Create Total Sales routine can also be triggered by selecting the job log(s) you want to process and then clicking the Create Total Sales button.
If a job log is already processed, you need to manually uncheck the Processed field, in order to re-process the log.
Shopify integration raw data will be stored in the Job Log table with the Job Type Shopify Order Import
Name field format: "Shopify - {store domain} - {store order number}"
Shopify store and SF account mapping setup, under Custom Setting - Shopify Setting
Name - Store Name
Customer Name → SF account name that the store is mapped to. The integration routine will use this name field to search for an SF account.
Store URL → domain of the Shopify store
Example1: http://doomlings.com
Example2: shop.facilitator.cards
Custom Setting - Shopify Setting
Shopify / Total Sales Fields Mapping
Total Sales Fields | Shopify Fields |
---|---|
Account | Each of the Source should point to an Account in SF, using Custom Setting to setup |
Account Name | New text field. Save Customer Name to it first then lookup to get Account |
Transaction Date | created_at |
Order Number | order_number |
Invoice Num | Shopify doc no |
Item | line_items.name |
Price | line_items.price |
Qty | line_items.quantity |
SKU | line_items.sku |
Source | order_status_url, to get the website's name? |
Taxes | total_tax |
First Name | customer.first_name |
Last Name | customer.last_name |
Phone Number | customer.phone |
Address 1 | shipping_address.address1 |
Address 2 | shipping_address.address2 |
City | shipping_address.City |
State/Provence | shipping_address.province |
Postal Code | shipping_address.zip |
Country Code | shipping_address.country_code |
Country | shipping_address.country |
customer.email | |
Total Sales | current_total_price |
Shipping Cost | total_shipping_price_set.shop_money.amount |
Shipping Service | shipping_lines.title |
Shopify Fulfillment Integration
Create an app and obtain the API Access Token
Settings → Apps and sales channels → Develop apps
Click Create an app
Enter an App name and then click Create app
Click Configure Admin API scopes to grant access permission, and make sure the following permissions are included.
read_fulfillments, write_fulfillments,
write_inventory, read_inventory,
read_locations,
write_merchant_managed_fulfillment_orders, read_merchant_managed_fulfillment_orders, read_customers,
read_assigned_fulfillment_orders, write_assigned_fulfillment_orders,
read_orders, read_order_edits,
read_products,
write_shipping, read_shipping,
write_third_party_fulfillment_orders, read_third_party_fulfillment_orders,
write_custom_fulfillment_services, read_custom_fulfillment_services
Then Navigate to API credentials to obtain the API access token.
Paste access token to Shopify store setting in a custom setting.
Manually Send Fulfillment Status to Shopify
Prerequisites:
The total Sales record Shipping Status field must be Shipped
GF Shopify Fulfillment Status Send must be False
In the Total Sales list, select Shopify orders that you want to update and then Click Send Fulfillment Status to Shopify
Manual order fulfillment
1. Click Pull Shopify Order Fulfillment Order Information to download Shopify fulfillment order info for the order.
2. Click Fulfill Shopify Order to send the fulfillment info to Shopify
The system will update GF Shopify Fulfillment Status Send to True after the Shopify order fulfillment status is transmitted.
Field Mapping
Total Sales | Shopify |
---|---|
Shipping Service | tracking_info.company |
tracking_number | tracking_info.number |
GF Shopify Fulfillment Order Id | line_items_by_fulfillment_order[].fulfillment_order_id |
GF Shopify Fulfillment Line Id | line_items_by_fulfillment_order[].fulfillment_order_line_items[].id |
Qty. | line_items_by_fulfillment_order[].fulfillment_order_line_items[].quantity |
notify_customer (default to true in code) |