Join Exclusive Live Event in San Francisco: Unlocking AI Impacts for Digitally Native Brands

Replacements: Shopify & Zendesk

Tomek Nowinski
01.05.2025

Share this article

Tomek Nowinski
01.05.2025

Ingredients

The systems used by this policy include Shopify, Zendesk, and Kodif.

What are AI Policies?

ai policies for customer support

At Kodif, we’re excited to announce the launch of Policies—a powerful, dynamic solution designed to revolutionize the way CX managers handle customer support. Unlike traditional flows, which are rigid and complex, Policies empower non-technical users to create and manage customer interactions with ease. Written in natural language, Policies make it simple to define and refine customer experiences without needing to rely on complicated flowcharts or scripting. This approach is not only user-friendly but also self-serve, enabling CX teams to quickly translate existing Standard Operating Procedures (SOPs) into automation, saving valuable time and resources.

The flexibility of Kodif Policies ensures that businesses can offer personalized, context-driven support while continuously improving customer experiences. With Policies, you can experiment with different strategies to optimize outcomes such as CSAT, revenue, and retention—all without the need to rebuild complex workflows. Whether it’s automating routine interactions or testing new approaches for high-stakes scenarios, Policies provide a scalable, adaptable solution that aligns with your business goals. While flows still have their place in sensitive, high-risk situations, Policies offer an agile alternative that helps businesses innovate faster and deliver exceptional, tailored experiences at scale.

“Send replacement” ticket type explained

In the realm of customer support, the “Send replacement” ticket type is essential for addressing customer complaints related to lost, damaged, or incorrect shipments. When a customer encounters these issues, they often seek a resolution that involves receiving a replacement product. By automating this process, businesses can efficiently handle such requests, ensuring quick and satisfactory responses that enhance customer loyalty and trust. This type of ticket is crucial for maintaining customer satisfaction and upholding a company’s reputation for reliability and responsiveness.

Which Platforms does this AI policy work on?

This AI policy is specifically designed to work with Shopify, Zendesk, and Kodif. However, Kodif integrates seamlessly with all other major platforms, ensuring broad applicability and ease of use across diverse e-commerce and customer service environments.

When should I use this policy?

This policy should be utilized when a customer requires a replacement shipment due to issues like a lost, damaged, or incorrect shipment. It is an effective tool for automating the process of verifying customer claims and facilitating the reshipment of products, thereby ensuring a seamless and efficient customer support experience.

Policy logic

This policy involves several steps to ensure a smooth replacement process:

  1. Ask for the user’s email address
  2. Use @get_shopify_account_details(email: str) to check if a user with that email address exists in Shopify.
  3. Ask for the order number of the shipment in question.

  4. Retrieve and Verify Order Details

  5. Use @shopify_order_details(order_id: str) to fetch the order details.
  6. Confirm the shipping status (e.g., “Delivered,” “In Transit,” “Out for Delivery”).
  7. Review the items in the order to verify what needs to be reshipped.

  8. Check Reshipment Eligibility

  9. Confirm the customer’s issue, such as a lost shipment, damaged items, or incorrect items.
  10. Use @check_reshipment_eligibility(order_id: str) to ensure the order qualifies for a reshipment.
  11. If the order is not eligible, use a macro to inform the customer of the ineligibility reason.

  12. Confirm Reshipment Details

  13. Ask the customer to confirm the reshipment address.
  14. Use @get_shopify_account_details(email: str) to retrieve the saved address or ask for a new address.
  15. Use @update_shopify_address(address_id: str, new_address: json) to update the shipping address if a new one is provided.

  16. Create a Reshipment Order

  17. Use @shopify_order_details(order_id: str) to gather the details of the original order.
  18. Use @create_shopify_order(items: list, address: json, user_email: str) to create a replacement order.
  19. Use @set_order_to_paid(order_id: str) to mark the new order as paid.
  20. If applicable, apply a 100% discount using @set_discount_to_order(order_id: str, percent: int).

  21. Notify the Customer

  22. Use a macro to inform the customer that their replacement order has been processed.

Example policy

Here is a practical example of the policy logic in action:

  1. Ask for the user’s email address
  2. Use @get_shopify_account_details(email: str) to check if a user with that email address exists in Shopify.
  3. Ask for the order number of the shipment in question.

  4. Retrieve and Verify Order Details

  5. Use @shopify_order_details(order_id: str) to fetch the order details.
  6. Confirm the shipping status (e.g., “Delivered,” “In Transit,” “Out for Delivery”).
  7. Review the items in the order to verify what needs to be reshipped.

  8. Check Reshipment Eligibility

  9. Confirm the customer’s issue, such as a lost shipment, damaged items, or incorrect items.
  10. Use @check_reshipment_eligibility(order_id: str) to ensure the order qualifies for a reshipment.
  11. If the order is not eligible, use a macro to inform the customer of the ineligibility reason.

  12. Confirm Reshipment Details

  13. Ask the customer to confirm the reshipment address.
  14. Use @get_shopify_account_details(email: str) to retrieve the saved address or ask for a new address.
  15. Use @update_shopify_address(address_id: str, new_address: json) to update the shipping address if a new one is provided.

  16. Create a Reshipment Order

  17. Use @shopify_order_details(order_id: str) to gather the details of the original order.
  18. Use @create_shopify_order(items: list, address: json, user_email: str) to create a replacement order.
  19. Use @set_order_to_paid(order_id: str) to mark the new order as paid.
  20. If applicable, apply a 100% discount using @set_discount_to_order(order_id: str, percent: int).

  21. Notify the Customer

  22. Use a macro to inform the customer that their replacement order has been processed.

Explore more AI policies

Share this article

Related Articles

Go the extra mile,
without lifting a finger.