WooCommerce - Order
Eventos da família order.* na integração WooCommerce.
Eventos Disponíveis
order.waiting_payment.boletoorder.waiting_payment.pixorder.waiting_payment.credit_cardorder.waiting_payment.depositorder.waiting_payment.cash_on_deliveryorder.waiting_payment.without_payment_methodorder.waiting_fulfillmentorder.completedorder.canceledorder.failedorder.refunded
Estrutura do Payload
{ "event": "order.completed", "orderId": "1234", "status": "completed", "createdAt": "2024-01-15T10:30:00", "updatedAt": "2024-01-15T11:00:00", "paidAt": "2024-01-15T10:35:00", "canceledAt": null, "refundedAt": null, "warrantyUntil": null, "currency": "BRL", "total": 10500, "shipping": { "carrier": "Correios", "totalValue": 1500, "trackingUrl": "https://rastreamento.correios.com.br/...", "trackingCode": "AB123456789CD", "method": "SEDEX", "deliveryAddress": { "street": "Rua Example", "number": "123", "complement": "Apto 1", "neighborhood": "Bairro", "city": "São Paulo", "state": "SP", "country": "BR", "postalCode": "01234567" }, "estimatedDeliveryDate": null, "estimatedDeliveryTimeInDays": 5, "rawStatus": null, "status": null }, "checkout": { "id": null, "url": "https://exemplo.com/checkout/order-received/1234/" }, "customer": { "id": "567", "name": "João Silva", "document": "12345678900", "phoneNumbers": [], "address": { "street": "Rua Example", "number": "123", "complement": "Apto 1", "neighborhood": "Bairro", "city": "São Paulo", "state": "SP", "country": "BR", "postalCode": "01234567" } }, "products": [ { "id": "PROD-001", "name": "Produto Exemplo", "quantity": 1, "unitValue": 10000, "totalValue": 10000, "imageUrl": null, "type": "product", "offerType": "main" } ], "payment": { "currency": "BRL", "total": 10500, "totalProductsValue": 10000, "discountValue": 0, "shippingValue": 1500, "coupons": [], "paymentMethod": "pix" }, "leadTracking": { "src": "facebook", "sck": null, "utmSource": "facebook", "utmCampaign": "campanha_01", "utmMedium": "cpc", "utmContent": null, "utmTerm": null, "utmId": null, "metaFbp": "fb.123456789", "googleGaId": null, "googleGclid": null, "googleGclsrc": null, "googleDclid": null, "googleGbraid": null, "googleWbraid": null, "tiktokTtlid": null, "ip": "192.168.1.1" }}Componentes do Payload
Customer
| Campo | Tipo | Descrição |
|---|---|---|
id | string | null | ID do cliente |
name | string | null | Nome completo do cliente |
document | string | null | Número do documento (CPF/CNPJ) |
email | string | null | Email do cliente |
phoneNumbers | Collection | Coleção de telefones |
address | Address | Endereço do cliente |
Subcomponentes
| Campo | Tipo | Descrição |
|---|---|---|
street | string | null | Nome da rua |
number | string | null | Número |
complement | string | null | Complemento |
neighborhood | string | null | Bairro |
city | string | null | Cidade |
state | string | null | Estado (UF) |
country | string | null | País |
postalCode | string | null | CEP |
Telefones
| Campo | Tipo | Descrição |
|---|---|---|
formattedPhone | string | null | Telefone formatado |
type | null | Sempre null |
rawNumber | string | null | Número bruto |
areaCode | string | null | Código de área |
internationalDialingCode | null | Sempre null |
Order
| Campo | Tipo | Descrição |
|---|---|---|
id | string | ID do pedido |
status | OrderStatus | null | Status normalizado do pedido |
raw_status | string | null | Status original do provider |
created_at | integer | null | Timestamp de criação |
updated_at | integer | null | Timestamp de atualização |
paid_at | integer | null | Timestamp do pagamento |
canceled_at | null | Sempre null |
refunded_at | null | Sempre null |
warranty_until | null | Sempre null |
Status Normalizados (OrderStatus)
A WooCommerce retorna os seguintes valores normalizados para o status do pedido:
| Valor | Descrição |
|---|---|
waiting_payment | Aguardando pagamento |
waiting_fulfillment | Aguardando processamento |
completed | Concluído |
refunded | Reembolsado |
canceled | Cancelado |
failed | Falhou |
Payment
| Campo | Tipo | Descrição |
|---|---|---|
currency | string | Moeda do pedido |
total | int | Valor total do pedido |
totalProductsValue | int | Soma dos valores dos produtos |
discountValue | int | Valor do desconto |
shippingValue | int | null | Valor do frete |
coupons | Collection | Coleção de cupons |
paymentMethod | PaymentMethod | null | Método de pagamento |
Métodos de Pagamento
| Campo | Tipo | Descrição |
|---|---|---|
brand | string | null | Bandeira do cartão |
lastDigits | string | null | Últimos 4 dígitos |
expirationMonth | int | null | Mês de expiração |
expirationYear | int | null | Ano de expiração |
| Campo | Tipo | Descrição |
|---|---|---|
qrcodeUrl | string | null | URL do QR Code Pix |
qrcodeSignature | string | null | Assinatura do QR Code Pix |
expirationDate | Carbon | null | Data de expiração |
pixKey | null | Sempre null |
pixKeyType | null | Sempre null |
| Campo | Tipo | Descrição |
|---|---|---|
digitableLine | string | null | Linha digitável do boleto |
url | string | null | URL do boleto ou PDF |
expirationDate | Carbon | null | Data de vencimento |
| Campo | Tipo | Descrição |
|---|---|---|
type | string | Sempre bank_transfer |
| Campo | Tipo | Descrição |
|---|---|---|
type | string | Sempre cash |
Cupom
| Campo | Tipo | Descrição |
|---|---|---|
id | null | Sempre null |
code | string | null | Código do cupom |
value | integer | null | Valor do desconto (em centavos) |
percentage | null | Sempre null |
incidence | string | Sempre products |
incidence_type | string | Sempre value |
expiration_date | null | Sempre null |
Product
| Campo | Tipo | Descrição |
|---|---|---|
id | string | ID do produto |
name | string | Nome do produto |
quantity | int | Quantidade |
unitValue | int | Valor unitário em centavos |
totalValue | int | Valor total |
imageUrl | string | null | URL da imagem do produto |
type | string | Sempre product |
offerType | string | Sempre main |
Shipping
| Campo | Tipo | Descrição |
|---|---|---|
carrier | string | null | Nome da transportadora |
total_value | integer | null | Valor do frete |
tracking_url | string | null | URL de rastreamento |
tracking_code | string | null | Código de rastreamento |
method | string | null | Método de envio |
delivery_address | Address | Endereço de entrega |
estimated_delivery_date | integer | null | Timestamp de entrega estimada |
estimated_delivery_time_in_days | integer | null | Dias estimados para entrega |
raw_status | null | Sempre null |
status | null | Sempre null |
| Campo | Tipo | Descrição |
|---|---|---|
street | string | null | Nome da rua |
number | string | null | Número |
complement | string | null | Complemento |
neighborhood | string | null | Bairro |
city | string | null | Cidade |
state | string | null | Estado (UF) |
country | string | null | País |
postalCode | string | null | CEP |
Checkout
| Campo | Tipo | Descrição |
|---|---|---|
id | null | Sempre null |
url | string | null | URL do checkout/pagamento |
LeadTracking
| Campo | Tipo | Descrição |
|---|---|---|
src | string | null | Fonte do tráfego |
sck | null | Sempre null |
utmSource | string | null | Fonte UTM |
utmCampaign | string | null | Campanha UTM |
utmMedium | string | null | Meio UTM |
utmContent | string | null | Conteúdo UTM |
utmTerm | string | null | Termo UTM |
utmId | string | null | UTM ID |
metaFbp | string | null | Facebook Pixel ID |
googleGaId | string | null | Google Analytics ID |
googleGclid | string | null | Google GCLID |
googleGclsrc | string | null | Google GCLSRC |
googleDclid | string | null | Google DCLID |
googleGbraid | string | null | Google BRAID |
googleWbraid | string | null | Google WBRAID |
tiktokTtlid | string | null | TikTok TTLID |
ip | string | null | Endereço IP do cliente |
| Campo | Tipo | Descrição |
|---|---|---|
src | null | Sempre null |
sck | null | Sempre null |
utm_source | null | Sempre null |
utm_campaign | null | Sempre null |
utm_medium | null | Sempre null |
utm_content | null | Sempre null |
utm_term | null | Sempre null |
utm_id | null | Sempre null |
meta_fbp | null | Sempre null |
google_ga_id | null | Sempre null |
google_gclid | null | Sempre null |
google_gclsrc | null | Sempre null |
google_dclid | null | Sempre null |
google_gbraid | null | Sempre null |
google_wbraid | null | Sempre null |
tiktok_ttlid | null | Sempre null |
ip | null | Sempre null |
[!NOTE] Essa integração não disponibiliza informações de lead tracking.