Last modified November 3, 2021 by Scott Elson

Shopify

Shopify logoShopify is a subscription-based software company that allows anyone to set up an online store and sell their products. Update your Shopify customer profiles with user details from Swrve and trigger push notifications from Swrve based on order status updates in Shopify with Swrve’s Shopify integration.

Supported actions

Swrve’s Shopify integration supports the following actions:

Outbound actions

  • Update customer data in Shopify; for example, the customer’s marketing subscription opt-in level.

Inbound actions

Process order status updates from Shopify, including:

  • Draft orders create
  • Draft orders update
  • Orders cancelled
  • Orders create
  • Orders fulfilled
  • Orders paid
  • Orders partially fulfilled
  • Orders updated

Use cases

Update customer properties

Using the Shopify connector, Swrve updates a customer’s contact data in Shopify upon receipt of a selected user action that is configured as a mobile event. There are two main steps involved in triggering contact data updates via the Shopify integration:

  1. Create a custom event in the Swrve SDK for the user action that you want to use to trigger the customer data update; for example, accepts_marketing.
  2. Create a rule in Swrve that is triggered on receipt of the designated event and uses the Update Customer Properties action.

Send push notification

The Shopify connector sends order, fulfillment, and payment events to Swrve, which you can use to trigger push notifications in Swrve. For example, when a customer’s order is fulfilled, use the Orders Fulfilled event to trigger a rule in Swrve that sends a push notification to a user with relevant details about their order (order ID, shipment status, shipping company, Tracking URL, and so forth).


Shopify configuration

In most instances, your CSM will set up your Shopify configuration, however you might need to provide them with certain credentials. In order to activate the Shopify adaptor, you will need the shop name and a private app’s Admin API credentials with read and write access to Customer, Draft Orders, and Orders. To view your active Swrve integrations, on the Manage menu, select Adaptors.

Step 1: To access the configuration settings, on the Shopify card, select Configure.

Step 2: Complete the following fields as required:

Field Description
Shop Name of your shop.
Access Token A 34 character string that uniquely identifies this account. Log in to Shopify to view this value.

Step 3: To save the configuration settings, select Save.

After you select Save, the configuration status changes to Active and the Deactivate button is available. If you Activate or Deactivate the configuration at any time, the changes apply to both the outbound and inbound actions.


Shopify actions

This section describes the fields that are included when creating a new rule using the selected action. For certain inbound actions, Swrve automatically creates a rule, while your CSM will likely configure any outbound actions. Most fields have the option to manually enter the value or to select a user property from the list to have Swrve automatically populate the value when the rule is processed.

Update customer properties

Update Customer Properties with Shopify.

Field Description
Customer ID The value of the Shopify Customer ID is required. This must be the ID created by Shopify not the Swrve User ID.(required)
Customer fields
Accepts Marketing Whether the customer has consented to receive marketing material via email.
Accepts Marketing Updated at The date and time (ISO 8601 format) when the customer consented or objected to receiving marketing material by email. Set this value whenever the customer consents or objects to marketing materials.
Email The unique email address of the customer. Attempting to assign the same email address to multiple customers returns an error.
First Name The customer’s first name.
Last Name The customer’s last name.
Marketing Opt in Level The marketing subscription opt-in level that the customer gave when they consented to receive marketing material by email. If the customer does not accept email marketing, then this property will be set to null. Valid values: single_opt_in, confirmed_opt_in, unknown
Multipass Identifier A unique identifier for the customer that’s used with Multipass login.
Note A note about the customer.
Phone The unique phone number (E.164 format) for this customer. Attempting to assign the same phone number to multiple customers returns an error. The property can be set using different formats, but each format must represent a number that can be dialed from anywhere in the world. The following formats are all valid: 6135551212, +16135551212, (613)555-1212, +1 613-555-1212
Tag Tags that the shop owner has attached to the customer, formatted as a string of comma-separated values. A customer can have up to 250 tags. Each tag can have up to 255 characters.
Tax Exempt Whether the customer is exempt from paying taxes on their order. If true, then taxes won’t be applied to an order at checkout. If false, then taxes will be applied at checkout.
Address
First Name The customer’s first name.
Last Name The customer’s last name.
Company The customer’s company.
Address Line 1 The first line of the customer’s mailing address.
Address Line 2 An additional field for the customer’s mailing address.
City The customer’s city, town, or village.
State/Province The customer’s region name. Typically a province, a state, or a prefecture.
Country The customer’s country.
Zip The customer’s postal code, also known as zip, postcode, Eircode, etc.
Phone The customer’s phone number at this address.
State/Province Code The code for the region of the address, such as the province, state, or district. For example QC for Quebec, Canada.
Country Code The two-letter country code corresponding to the customer’s country.
Default Whether this address is the default address for the customer.

Inbound actions

The Shopify inbound actions use webhooks with the Shopify system to receive order, payment, and fulfillment events. The webhooks are set up when you create a rule with a Shopify event. Shopify sends the following events to Swrve:

Multiple line item and fulfillment fields are condensed to comma separated strings.
Event Description
Draft Orders Create User has created a draft order.
Draft Orders Update User’s draft order has been updated
Orders Cancelled Order has been cancelled due to the following reasons: customer, fraud, inventory, declined, and other.
Orders Create User has created an order
Orders Fulfilled Order has been completely fulfilled.
Orders Paid Order has been paid.
Orders Partially Fulfilled Order has been partially fulfilled.
Orders Updated User’s order has been updated.