Loading
Agentforce Contact Center
Índice
Selecionar filtros

          Sem resultados
          Sem resultados
          Aqui estão algumas dicas de pesquisa

          Verifique a grafia das palavras-chave.
          Tente utilizar termos mais genéricos.
          Selecione menos filtros para ampliar sua pesquisa.

          Pesquisar em toda a Ajuda do Salesforce
          Apex Classes for Catalog Messaging Components

          Apex Classes for Catalog Messaging Components

          Use these example Apex classes to process a Meta product catalog and return catalog data to your WhatsApp messaging component.

          Sample Apex Class for Multi-Product Messages

          This sample Apex class returns a list of RichMessaging.CatalogSection objects for a multi-product message. For more information on how to create an Apex class, see Create an Apex Class.

          Note
          Note For a multi-product message, create a list of RichMessaging.CatalogSection.
          public with sharing class GetCatalogSection {
              @InvocableMethod
              public static List<List<RichMessaging.CatalogSection>> getCatalogSection() {
                  String title = 'Wallpapers';
                  List<String> productIds = new List<String>();
                  productIds.add('ymrgtcg9co');
                  RichMessaging.CatalogSection catalogSection = new RichMessaging.CatalogSection();
                  catalogSection.titleValue = title;
                  catalogSection.productIdsValue = productIds;
          
                  List<RichMessaging.CatalogSection> x = new List<RichMessaging.CatalogSection>();
                  x.add(catalogSection);
                  List<List<RichMessaging.CatalogSection>> y = new List<List<RichMessaging.CatalogSection>>();
                  y.add(x);
                  return y;
              }
          }

          Sample Class Implementation for Single-Product and Catalog Messages

          Use this sample class implementation for both single-product and catalog messages. The class implements the RichMessaging.ProcessCatalogOrderHandler interface.

          global class MyProcessCatalogOrderHandler implements RichMessaging.ProcessCatalogOrderHandler {
              global RichMessaging.ProcessCatalogOrderResult processCatalogOrderRequest(
                      RichMessaging.ProcessCatalogOrderRequest catalogOrderRequest) {
                  return new RichMessaging.ProcessCatalogOrderResult(
                      RichMessaging.ProcessCatalogOrderResultStatus.SUCCESS, null, 'order-ref-123');
              }
          }
           
          Carregando
          Salesforce Help | Article