AWS Contact Center
Amazon Connect Customer Profiles Connectors for Segment and Shopify
Contact center agents are often forced to toggle between multiple applications to search for information they need to resolve customer issues. Amazon Connect Customer Profiles automatically consolidates customer information from multiple applications and uses this information to establish a unified customer profile that it delivers to your contact center agent as soon as a support call or interaction begins. In doing so, it empowers agents to deliver more efficient, personalized customer service.
With just a few clicks, you can ingest data from third party applications to create unified customer profiles leveraging the pre-built connectors we provide for Salesforce, ServiceNow, Zendesk, Marketo and Amazon Simple Storage Service (Amazon S3). Today Customer Profiles now supports near real-time data ingestion from Segment and Shopify. Use existing Segment data sources to ingest customer information such as name, email address, and phone number into Amazon Connect. Once your connectors are configured, customer profiles are created and updated in near real-time for new customer actions such as new customer registration, change in contact information, and new order transactions. When a customer calls in, Customer Profiles identifies the customer and presents the agent with latest and most up to date customer information to help them service the customer.
Get started with the Segment and Shopify connectors by following simple steps in our documentation. Amazon Connect Customer Profiles have pre-built connectors for Salesforce, ServiceNow, Zendesk, Marketo, Amazon S3, Segment, and Shopify in Europe (London), Europe (Frankfurt), Asia Pacific (Sydney), Asia Pacific (Singapore), Asia Pacific (Tokyo), Canada (Central). US West (Oregon), and US East (N. Virginia). To learn more about Amazon Connect Customer Profiles please visit the Customer Profiles website.
Overview of solution
For this walk through, you should have the following prerequisites:
- An AWS account
- An Amazon Connect instance
- An existing Shopify account
Get Started
- Open the Amazon Connect console at https://console.aws.amazon.com/connect/
- On the instances page, choose the instance alias.
- In the navigation pane, choose Customer profiles.
- On the Customer profiles configuration page, choose Enable Customer Profiles.
- On the Customer profiles configuration page, choose Add integration.
- On the Select source page, choose Shopify and acknowledge the terms.
- On the Establish connection with Shopify select Create new connection. Then enter Shopify details of Connect name > Connection URL > Client ID.
- Customer Profiles uses Amazon EventBridge for integrations with Shopify. Log in to your application to continue setting up the Amazon EventBridge event source.
On the Source set up section, follow the instructions required to set up your external application.
· Copy your AWS account ID to your clipboard.
· Log in to partners.shopify.com to configure Amazon EventBridge.
· Create a source in the Event Subscription section, under Amazon EventBridge.
· Paste your AWS account ID and select your AWS region.
· Once you’ve set up the event source destination, return to Customer Profiles. You will see an alert that indicates Amazon Connect has successfully connected with Shopify. Continue to the next step to continue setting up the integration.
- Log into Shopify setup and select Create source button and paste the AWS Account ID along with the AWS region and give a Partner Event Source name. Copy the source name.
- Go back to Customer Profiles console and paste he source name into the appropriate input and click next. Customer Profiles will confirm that the Partner Event Source is created and navigate the user to the next page.
- On the Integration options page, chose which source objects you want to ingest and select their object type. Object types store your ingested data. They also define how objects from your integrations are mapped to profiles when they are ingested.
- For the ingestion start date, this type of integration currently supports ingesting records created after the integration is added.
- On the Review and integrate page, check that the Connection status says Connected, and then choose Add integration.
- You need to make sure your app has the required permissions, in order to get the permissions from your store you can use the following link template:
https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}
Where
· shop is the name of your Shopify store.
· api_key is the API Key of your Shopify app which can be found on the App details page.
· scopes should have the value “read_customers,read_orders,read_draft_orders”.
· redirect_uri is the redirect URI you specified for your app when you created it. For our purposes it can be any valid url.
· nonce can be any unique value to identify a given authorization request from others. Using a timestamp is the recommended/safer option.This will take you to a Shopify installation/authorization page.
- Install/Authorize the app on behalf of your store which will take you to the redirect URI you have entered with an authorization code appended to redirect URI as a query parameter. Example:
https://example.org/some/redirect/uri?code={authorization_code}&hmac=da9d83c171400a41f8db91a950508985&host={base64_encoded_hostname}×tamp=1409617544&state={nonce}&shop={shop_origin}&host={host}
Copy the authorization_code from this URI and use it to get a permanent access token. - Make a POST Shopify Admin API to this endpoint using CURL or POSTMAN
https://{shop}.myshopify.com/admin/oauth/access_token
Request
{
"code": "authorization_code_received_from_redirect_uri",
"client_id": "your_app_api_key",
"client_secret": "your_app_api_secret"
}
Response
{
"access_token": "permanent_access_token",
"scope": "read_customers,read_orders,read_draft_orders"
}
Note the access_token - Make the following POST request for each of the topics listed below to setup webhook subscriptions:
Request Body:
{
"webhook": {
"topic": "replace_this_with_one_of_the_topics_in_the_list_below",
"address": "this_is_the_event_source_arn_generated_when_you_created_the_event_integration",
"format": "json"
}
}
For each subscription replace the value for “topic” with the following values:
· customers/create
· customers/enable
· customers/update
· draft_orders/create
· draft_orders/update
· orders/cancelled
· orders/create
· orders/fulfilled
· orders/paid
· orders/partially_fulfilled
· orders/updated
Testing
- Sign in as Admin to your Shopify Store
- Click on Customers option that’s on the left side panel
- Click on Add Customer at the top of the page on the right side.
- Enter customer details. These don’t have to belong to a real customer. You will delete this customer entry after the verification. Make sure to enter a phone number and email.
- Save the customer object.
- Allow for a minute for it to be delivered and create a customer profile.
- Open Contact Control Panel and look up the user by email or phone number you entered into the Shopify Store earlier, you should be able to see the customer profile with the same email or phone number.
Clean up
- Navigate to Customer Profiles > Identity resolution and select Disable Identity Resolution.
Conclusion
In this post we demonstrated how to connect Shopify with Amazon Connect Customer Profiles. Customers that exist in Shopify can now contact AnyCompany and have their details automatically presented to the agent at the point of interaction enabling for a smooth customer service experience. To get started visit the Amazon Connect Administration guide.