Como integrar a sua loja da Xtech via Pluga Webhooks

Integrar a Xtech com outras ferramentas web (como, por exemplo, Google Sheets, ContaAzul ou RD Station) via Pluga Webhooks é muito simples. Basta seguir este passo a passo:

1. Acesse a página de automatizações do Pluga Webhooks e escolha qual será a ferramenta que receberá os dados da sua loja da Xtech;

2. Após escolher a automatização e clicar em "Fazer essa automatização", nomeie o Pluga Webhooks que será usado para integrar a sua loja. Depois clique em "Gerar Pluga Webhook", conforme mostrado abaixo:

Xtech_01.gif

3. Copie a URL que você acabou de gerar;

4. Faça login na sua conta da Xtech;

5. No seu painel administrativo da Xtech, clique na engrenagem no menu superior e acesse a área de “Webhooks/APIs", como mostra a imagem abaixo:

6. Agora você deverá colar a URL gerada (ao criar a sua automatização da Pluga) na sua loja da Xtech de acordo com gatilho desejado.

Por exemplo, se você quer enviar para o Google Sheets todos os pedidos criados, adicione a URL gerada (ao criar a sua automatização da Pluga) em “Pedido criado” na Xtech, como mostra a imagem abaixo:

 

Observação: Um gatilho pode ter mais de uma URL. Nesse caso, separe-as com vírgulas.

Ótimo! Agora que está tudo Ok na Xtech:

7. Volte para a sua automatização na Pluga e clique em "Continuar":

8. Em "Modelo de envio dos dados para notificação" cole o JSON referente ao gatilho [lá do 6º passo] que você escolheu e clique em "Continuar". Veja o exemplo:

Se o gatilho escolhido é Pedido Criado, você vai usar esse JSON aqui 👇

{
"order": {
"ship_id": "3318156",
"ship_created_at": "0000-00-00 00:00:00",
"ship_company": null,
"ship_firstname": "xtech",
"ship_lastname": "teste",
"ship_email": "teste@xtechcommerce.com",
"ship_phone": "(25) 99999-9999",
"ship_address1": "Rua Campos Sales",
"ship_address2": null,
"ship_anumber": "16",
"ship_district": "Tijuca",
"ship_city": "Rio de Janeiro",
"ship_zip": "20270-214",
"ship_zone_id": "458",
"ship_zone": "RJ",
"ship_country_id": "30",
"ship_country": "Brazil",
"ship_country_code": "BR",
"ship_reference": null,
"ship_extra": "{\"cnpj\":\"\",\"company_registration\":\"\",\"company_alt\":\"\"}",
"ship_site_id": "417",
"bill_id": "3318156",
"bill_created_at": "0000-00-00 00:00:00",
"bill_company": null,
"bill_firstname": "xtech",
"bill_lastname": "teste",
"bill_email": "teste@xtechcommerce.com",
"bill_phone": "(25) 99999-9999",
"bill_address1": "Rua Campos Sales",
"bill_address2": null,
"bill_anumber": "16",
"bill_district": "Tijuca",
"bill_city": "Rio de Janeiro",
"bill_zip": "20270-214",
"bill_zone_id": "458",
"bill_zone": "RJ",
"bill_country_id": "30",
"bill_country": "Brazil",
"bill_country_code": "BR",
"bill_reference": null,
"bill_extra": "{\"cnpj\":\"\",\"company_registration\":\"\",\"company_alt\":\"\"}",
"bill_site_id": "417",
"customer_id": "3003415",
"customer_firstname": "xtech",
"customer_lastname": "teste",
"customer_email": "teste@xtechcommerce.com",
"customer_email_subscribe": "1",
"customer_phone": "(25) 99999-9999",
"customer_company": null,
"customer_default_billing_address": "2617587",
"customer_default_shipping_address": "2617587",
"customer_ship_to_bill_address": "true",
"customer_active": "1",
"customer_group_id": "1",
"customer_confirmed": "1",
"customer_site_id": "417",
"customer_sex": "0",
"customer_cpf": "159.839.107-01",
"customer_birthday": "1994-01-25",
"customer_mobile": null,
"customer_cnpj": null,
"customer_company_alt": null,
"customer_company_registration": null,
"customer_company_registration_alt": null,
"customer_subscribed": "0",
"customer_job": null,
"customer_company_description": null,
"customer_instant_buy_token": null,
"customer_additionals": null,
"customer_payment_method_info": null,
"id": "2921063",
"order_number": "152900401842",
"status": "Pending",
"ordered_on": "2018-06-14 16:29:49",
"tax": "0.00",
"total": "120.40",
"subtotal": "100.00",
"gift_card_discount": "0.00",
"coupon_discount": "0.00",
"payment_discount": "0.00",
"look_discount": "0.00",
"shipping": "20.40",
"shipping_notes": null,
"shipping_method": "PAC",
"payment_info": "Sem pagamento",
"referral": null,
"company": null,
"firstname": "xtech",
"lastname": "teste",
"phone": "(25) 99999-9999",
"email": "teste@xtechcommerce.com",
"site_id": "417",
"history": "[\"Pending (14\\\/06\\\/2018 16:29:49)\"]",
"tracking_number": null,
"delivery_time": "5",
"production_time": "0",
"days_until_shipped": "0",
"approved_on": "0000-00-00 00:00:00",
"contaazul": "0",
"sentalert": "0",
"nota_fiscal": null,
"shipping_method_alt": null,
"extra": null,
"payment_type": "OTHER",
"payment_id": "152900401842",
"origin_id": "0",
"salesman_id": "0",
"ship_address_id": "3318156",
"bill_address_id": "3318156",
"payment_options": null,
"currency": "BRL",
"coupon_ids": null,
"sent_testimonial": "0",
"ip_address": "200.142.121.50, 52.46.43.153",
"referral_id": "0",
"referral_converted_value": "0.00",
"referral_info": null,
"referral_discount": "0.00",
"campaign_discount": "0.00",
"referral_confirmation": "0",
"used_device": "desktop",
"payment_status_check": "0000-00-00 00:00:00",
"external_info": null,
"company_alt": null,
"company_registration": null,
"company_registration_alt": null,
"user_agent": "Amazon CloudFront",
"payment": {
"module": "Sem pagamento"
},
"contents": [{
"order_id": "2921063",
"product_id": "3094041",
"order_item_id": "6012530",
"id": "3094041",
"sku": "FA9001",
"name": "Teste 3",
"slug": "Teste-copia",
"price": "25.00",
"saleprice": "0.00",
"free_shipping": "0",
"shippable": "1",
"taxable": "0",
"fixed_quantity": "0",
"weight": null,
"track_stock": "1",
"enabled": "1",
"site_id": "417",
"video": null,
"height": "0.00",
"width": "0.00",
"depth": "0.00",
"factory_price": "0.00",
"installments": "0",
"stared": "0",
"variant_details": "0",
"subscription_days": "0",
"subscription_period": "0",
"subscription_trial": "0",
"lookable": "0",
"reduction_type": "0",
"reduction_amount": "0",
"processing_days": "0",
"rating": "0",
"ncm_code": null,
"gtin_code": null,
"product_main_category": "170038",
"product_main_category_text": "Categoria Alterada",
"current_category": "0",
"discounted_price": "25.00",
"installment_price": null,
"base_price": "25.00",
"original_quantity": "15",
"is_gc": "0",
"image": "https:\/\/assets.xtechcommerce.com\/uploads\/images\/thumbnails\/2d5fb93bc7c91d45e41a35053f616067.jpg",
"quantity": "4",
"subtotal": "100"
}],
"total_discounts": "0"
}
}

Se o gatilho escolhido é Mudança de Pedido, você vai usar esse JSON aqui 👇

{
"order": {
"ship_id": "3318156",
"ship_created_at": "0000-00-00 00:00:00",
"ship_company": null,
"ship_firstname": "xtech",
"ship_lastname": "teste",
"ship_email": "teste@xtechcommerce.com",
"ship_phone": "(25) 99999-9999",
"ship_address1": "Rua Campos Sales",
"ship_address2": null,
"ship_anumber": "16",
"ship_district": "Tijuca",
"ship_city": "Rio de Janeiro",
"ship_zip": "20270-214",
"ship_zone_id": "458",
"ship_zone": "RJ",
"ship_country_id": "30",
"ship_country": "Brazil",
"ship_country_code": "BR",
"ship_reference": null,
"ship_extra": "{\"cnpj\":\"\",\"company_registration\":\"\",\"company_alt\":\"\"}",
"ship_site_id": "417",
"bill_id": "3318156",
"bill_created_at": "0000-00-00 00:00:00",
"bill_company": null,
"bill_firstname": "xtech",
"bill_lastname": "teste",
"bill_email": "teste@xtechcommerce.com",
"bill_phone": "(25) 99999-9999",
"bill_address1": "Rua Campos Sales",
"bill_address2": null,
"bill_anumber": "16",
"bill_district": "Tijuca",
"bill_city": "Rio de Janeiro",
"bill_zip": "20270-214",
"bill_zone_id": "458",
"bill_zone": "RJ",
"bill_country_id": "30",
"bill_country": "Brazil",
"bill_country_code": "BR",
"bill_reference": null,
"bill_extra": "{\"cnpj\":\"\",\"company_registration\":\"\",\"company_alt\":\"\"}",
"bill_site_id": "417",
"customer_id": "3003415",
"customer_firstname": "xtech",
"customer_lastname": "teste",
"customer_email": "teste@xtechcommerce.com",
"customer_email_subscribe": "1",
"customer_phone": "(25) 99999-9999",
"customer_company": null,
"customer_default_billing_address": "2617587",
"customer_default_shipping_address": "2617587",
"customer_ship_to_bill_address": "true",
"customer_active": "1",
"customer_group_id": "1",
"customer_confirmed": "1",
"customer_site_id": "417",
"customer_sex": "0",
"customer_cpf": "159.839.107-01",
"customer_birthday": "1994-01-25",
"customer_mobile": null,
"customer_cnpj": null,
"customer_company_alt": null,
"customer_company_registration": null,
"customer_company_registration_alt": null,
"customer_subscribed": "0",
"customer_job": null,
"customer_company_description": null,
"customer_instant_buy_token": null,
"customer_additionals": null,
"customer_payment_method_info": null,
"id": "2921063",
"order_number": "152900401842",
"status": "Processing",
"ordered_on": "2018-06-14 16:29:49",
"tax": "0.00",
"total": "120.40",
"subtotal": "100.00",
"gift_card_discount": "0.00",
"coupon_discount": "0.00",
"payment_discount": "0.00",
"look_discount": "0.00",
"shipping": "20.40",
"shipping_notes": null,
"shipping_method": "PAC",
"payment_info": "Sem pagamento",
"referral": null,
"company": null,
"firstname": "xtech",
"lastname": "teste",
"phone": "(25) 99999-9999",
"email": "teste@xtechcommerce.com",
"site_id": "417",
"history": "[\"Pending (14\\\/06\\\/2018 16:29:49)\",\"Pagamento Aprovado (14\\\/06\\\/2018 16:37:11) - Alterado por: suporte@xtechcommerce.com.br\"]",
"tracking_number": null,
"delivery_time": "5",
"production_time": "0",
"days_until_shipped": "0",
"approved_on": "2018-06-14 16:37:11",
"contaazul": "0",
"sentalert": "1",
"nota_fiscal": null,
"shipping_method_alt": null,
"extra": null,
"payment_type": "OTHER",
"payment_id": "152900401842",
"origin_id": "0",
"salesman_id": "0",
"ship_address_id": "3318156",
"bill_address_id": "3318156",
"payment_options": null,
"currency": "BRL",
"coupon_ids": null,
"sent_testimonial": "0",
"ip_address": "200.142.121.50, 52.46.43.153",
"referral_id": "0",
"referral_converted_value": "0.00",
"referral_info": null,
"referral_discount": "0.00",
"campaign_discount": "0.00",
"referral_confirmation": "0",
"used_device": "desktop",
"payment_status_check": "0000-00-00 00:00:00",
"external_info": null,
"company_alt": null,
"company_registration": null,
"company_registration_alt": null,
"user_agent": "Wget\/1.15 (linux-gnu)",
"payment": {
"module": "Sem pagamento"
},
"contents": [
{
"order_id": "2921063",
"product_id": "3094041",
"order_item_id": "6012530",
"id": "3094041",
"sku": "FA9001",
"name": "Teste 3",
"slug": "Teste-copia",
"price": "25.00",
"saleprice": "0.00",
"free_shipping": "0",
"shippable": "1",
"taxable": "0",
"fixed_quantity": "0",
"weight": null,
"track_stock": "1",
"enabled": "1",
"site_id": "417",
"video": null,
"height": "0.00",
"width": "0.00",
"depth": "0.00",
"factory_price": "0.00",
"installments": "0",
"stared": "0",
"variant_details": "0",
"subscription_days": "0",
"subscription_period": "0",
"subscription_trial": "0",
"lookable": "0",
"reduction_type": "0",
"reduction_amount": "0",
"processing_days": "0",
"rating": "0",
"ncm_code": null,
"gtin_code": null,
"product_main_category": "170038",
"product_main_category_text": "Categoria Alterada",
"current_category": "0",
"discounted_price": "25.00",
"installment_price": null,
"base_price": "25.00",
"original_quantity": "15",
"is_gc": "0",
"image": "https:\/\/assets.xtechcommerce.com\/uploads\/images\/thumbnails\/2d5fb93bc7c91d45e41a35053f616067.jpg",
"quantity": "4",
"subtotal": "100"
}
],
"total_discounts": "0",
"prev": {
"id": "2921081",
"order_number": "152900459082",
"customer_id": "3003415",
"status": "Pending",
"ordered_on": "2018-06-14 16:32:14",
"tax": "0.00",
"total": "45.40",
"subtotal": "25.00",
"gift_card_discount": "0.00",
"coupon_discount": "0.00",
"payment_discount": "0.00",
"look_discount": "0.00",
"shipping": "20.40",
"shipping_notes": null,
"shipping_method": "SEDEX",
"payment_info": "Sem pagamento",
"referral": null,
"company": null,
"firstname": "xtech",
"lastname": "teste",
"phone": "(25) 99999-9999",
"email": "teste@xtechcommerce.com",
"site_id": "417",
"history": "[\"Pending (14\\\/06\\\/2018 16:32:14)\"]",
"tracking_number": null,
"delivery_time": "1",
"production_time": "0",
"days_until_shipped": "0",
"approved_on": "0000-00-00 00:00:00",
"contaazul": "0",
"sentalert": "0",
"nota_fiscal": null,
"shipping_method_alt": null,
"extra": null,
"payment_type": "OTHER",
"payment_id": "152900459082",
"origin_id": "0",
"salesman_id": "0",
"ship_address_id": "3318175",
"bill_address_id": "3318175",
"payment_options": null,
"currency": "BRL",
"coupon_ids": null,
"sent_testimonial": "0",
"ip_address": "200.142.121.50, 52.46.43.153",
"referral_id": "0",
"referral_converted_value": "0.00",
"referral_info": null,
"referral_discount": "0.00",
"campaign_discount": "0.00",
"referral_confirmation": "0",
"used_device": "desktop",
"payment_status_check": "0000-00-00 00:00:00",
"external_info": null,
"company_alt": null,
"company_registration": null,
"company_registration_alt": null,
"user_agent": "Amazon CloudFront"
},
"next": {
"id": "2177013",
"order_number": "151438317873",
"customer_id": "2330226",
"status": "In Analysis",
"ordered_on": "2017-12-27 13:15:24",
"shipped_on": "2018-01-11 19:30:00",
"tax": "0.00",
"total": "41.10",
"subtotal": "25.00",
"gift_card_discount": "0.00",
"coupon_discount": "0.00",
"payment_discount": "0.00",
"look_discount": "0.00",
"shipping": "16.10",
"shipping_notes": null,
"shipping_method": "PAC",
"payment_info": "{\"module\":\"Pagseguro App\",\"boletourl\":\"https:\\\/\\\/pagseguro.uol.com.br\\\/checkout\\\/payment\\\/booklet\\\/print.jhtml?c=7e071489e23b6c67660035d83a5bdd48be23b78d74e2d09497a69e95d75c12eeed0927166a7b6c60\"}",
"referral": null,
"company": null,
"firstname": "bunda",
"lastname": "lele",
"phone": "(21) 9999-9999",
"email": "bunda@lele.com",
"site_id": "417",
"history": "[\"Aguardando Pagamento (27\\\/12\\\/2017 13:15:24)\",\"Cancelado: Pagamento n\\u00e3o identificado (06\\\/01\\\/2018 00:00:03) - Alterado por: Cancelamento autom\\u00e1tico\",\"Em produ\\u00e7\\u00e3o (11\\\/01\\\/2018 19:29:04) - Alterado por: suporte@xtechcommerce.com.br\",\"Enviado - Rastreio: (11\\\/01\\\/2018 19:30:19) - Alterado por: suporte@xtechcommerce.com.br\",\"Em produ\\u00e7\\u00e3o (31\\\/01\\\/2018 15:43:47) - Alterado por: suporte@xtechcommerce.com.br\",\"Pagamento Aprovado (20\\\/04\\\/2018 17:50:34) - Alterado por: suporte@xtechcommerce.com.br\",\"Pagamento em An\\u00e1lise (20\\\/04\\\/2018 18:10:21) - Alterado por: suporte@xtechcommerce.com.br\",\"Pagamento Aprovado (20\\\/04\\\/2018 18:14:11) - Alterado por: suporte@xtechcommerce.com.br\",\"Pagamento em An\\u00e1lise (14\\\/06\\\/2018 16:18:31) - Alterado por: suporte@xtechcommerce.com.br\"]",
"tracking_number": "PD000000014BR",
"delivery_time": "7",
"production_time": "0",
"days_until_shipped": "0",
"approved_on": "2018-04-20 18:14:11",
"contaazul": "0",
"sentalert": "1",
"nota_fiscal": null,
"shipping_method_alt": null,
"extra": null,
"payment_type": "BOLETO",
"delivering_on": "2018-01-22",
"payment_id": "151438317873",
"origin_id": "0",
"salesman_id": "0",
"ship_address_id": "2545820",
"bill_address_id": "2545820",
"payment_options": null,
"currency": "BRL",
"coupon_ids": null,
"sent_testimonial": "0",
"ip_address": "179.210.101.97, 205.251.221.124",
"referral_id": "0",
"referral_converted_value": "0.00",
"referral_info": null,
"referral_discount": "0.00",
"campaign_discount": "0.00",
"referral_confirmation": "0",
"used_device": "desktop",
"payment_status_check": "0000-00-00 00:00:00",
"external_info": null,
"company_alt": null,
"company_registration": null,
"company_registration_alt": null
}
}
}

Dica! Você pode conferir esses e outros exemplos de JSON na página de documentação da Xtech.

9. Mapeie os campos e personalize as informações que serão enviadas pela Xtech, como mostra o gif abaixo:

finalizando4.gif

10. Prontinho! Agora é só clicar em "Finalizar automatização" e deixar os robôs da Pluga trabalharem para você.

Ainda tem alguma dúvida?

Escreva pra gente. Estamos à disposição para ajudar você ;)

Esse artigo foi útil?
Usuários que acharam isso útil: 0 de 0