:doc:`Invoicing <../../invoicing>` / Client / create_procurement_portal_preference

************************************
create_procurement_portal_preference
************************************



.. py:method:: Invoicing.Client.create_procurement_portal_preference(**kwargs)

  

  Creates a procurement portal preference configuration for e-invoice delivery and purchase order retrieval. This preference defines how invoices are delivered to a procurement portal and how purchase orders are retrieved.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/invoicing-2024-12-01/CreateProcurementPortalPreference>`_  


  **Request Syntax**
  ::

    response = client.create_procurement_portal_preference(
        ProcurementPortalName='SAP_BUSINESS_NETWORK'|'COUPA',
        BuyerDomain='NetworkID',
        BuyerIdentifier='string',
        SupplierDomain='NetworkID',
        SupplierIdentifier='string',
        Selector={
            'InvoiceUnitArns': [
                'string',
            ],
            'SellerOfRecords': [
                'string',
            ]
        },
        ProcurementPortalSharedSecret='string',
        ProcurementPortalInstanceEndpoint='string',
        TestEnvPreference={
            'BuyerDomain': 'NetworkID',
            'BuyerIdentifier': 'string',
            'SupplierDomain': 'NetworkID',
            'SupplierIdentifier': 'string',
            'ProcurementPortalSharedSecret': 'string',
            'ProcurementPortalInstanceEndpoint': 'string'
        },
        EinvoiceDeliveryEnabled=True|False,
        EinvoiceDeliveryPreference={
            'EinvoiceDeliveryDocumentTypes': [
                'AWS_CLOUD_INVOICE'|'AWS_CLOUD_CREDIT_MEMO'|'AWS_MARKETPLACE_INVOICE'|'AWS_MARKETPLACE_CREDIT_MEMO'|'AWS_REQUEST_FOR_PAYMENT',
            ],
            'EinvoiceDeliveryAttachmentTypes': [
                'INVOICE_PDF'|'RFP_PDF',
            ],
            'Protocol': 'CXML',
            'PurchaseOrderDataSources': [
                {
                    'EinvoiceDeliveryDocumentType': 'AWS_CLOUD_INVOICE'|'AWS_CLOUD_CREDIT_MEMO'|'AWS_MARKETPLACE_INVOICE'|'AWS_MARKETPLACE_CREDIT_MEMO'|'AWS_REQUEST_FOR_PAYMENT',
                    'PurchaseOrderDataSourceType': 'ASSOCIATED_PURCHASE_ORDER_REQUIRED'|'PURCHASE_ORDER_NOT_REQUIRED'
                },
            ],
            'ConnectionTestingMethod': 'PROD_ENV_DOLLAR_TEST'|'TEST_ENV_REPLAY_TEST',
            'EinvoiceDeliveryActivationDate': datetime(2015, 1, 1)
        },
        PurchaseOrderRetrievalEnabled=True|False,
        Contacts=[
            {
                'Name': 'string',
                'Email': 'string'
            },
        ],
        ResourceTags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ],
        ClientToken='string'
    )
    
  :type ProcurementPortalName: string
  :param ProcurementPortalName: **[REQUIRED]** 

    The name of the procurement portal.

    

  
  :type BuyerDomain: string
  :param BuyerDomain: **[REQUIRED]** 

    The domain identifier for the buyer in the procurement portal.

    

  
  :type BuyerIdentifier: string
  :param BuyerIdentifier: **[REQUIRED]** 

    The unique identifier for the buyer in the procurement portal.

    

  
  :type SupplierDomain: string
  :param SupplierDomain: **[REQUIRED]** 

    The domain identifier for the supplier in the procurement portal.

    

  
  :type SupplierIdentifier: string
  :param SupplierIdentifier: **[REQUIRED]** 

    The unique identifier for the supplier in the procurement portal.

    

  
  :type Selector: dict
  :param Selector: 

    Specifies criteria for selecting which invoices should be processed using a particular procurement portal preference.

    

  
    - **InvoiceUnitArns** *(list) --* 

      The Amazon Resource Name (ARN) of invoice unit identifiers to which this preference applies.

      

    
      - *(string) --* 

      
  
    - **SellerOfRecords** *(list) --* 

      The list of seller of record IDs to which this preference applies.

      

    
      - *(string) --* 

      
  
  
  :type ProcurementPortalSharedSecret: string
  :param ProcurementPortalSharedSecret: 

    The shared secret or authentication credential used to establish secure communication with the procurement portal. This value must be encrypted at rest.

    

  
  :type ProcurementPortalInstanceEndpoint: string
  :param ProcurementPortalInstanceEndpoint: 

    The endpoint URL where e-invoices will be delivered to the procurement portal. Must be a valid HTTPS URL.

    

  
  :type TestEnvPreference: dict
  :param TestEnvPreference: 

    Configuration settings for the test environment of the procurement portal. Includes test credentials and endpoints that are used for validation before production deployment.

    

  
    - **BuyerDomain** *(string) --* **[REQUIRED]** 

      The domain identifier to use for the buyer in the test environment.

      

    
    - **BuyerIdentifier** *(string) --* **[REQUIRED]** 

      The unique identifier to use for the buyer in the test environment.

      

    
    - **SupplierDomain** *(string) --* **[REQUIRED]** 

      The domain identifier to use for the supplier in the test environment.

      

    
    - **SupplierIdentifier** *(string) --* **[REQUIRED]** 

      The unique identifier to use for the supplier in the test environment.

      

    
    - **ProcurementPortalSharedSecret** *(string) --* 

      The shared secret or authentication credential to use for secure communication in the test environment.

      

    
    - **ProcurementPortalInstanceEndpoint** *(string) --* 

      The endpoint URL where e-invoices will be delivered in the test environment.

      

    
  
  :type EinvoiceDeliveryEnabled: boolean
  :param EinvoiceDeliveryEnabled: **[REQUIRED]** 

    Indicates whether e-invoice delivery is enabled for this procurement portal preference. Set to true to enable e-invoice delivery, false to disable.

    

  
  :type EinvoiceDeliveryPreference: dict
  :param EinvoiceDeliveryPreference: 

    Specifies the e-invoice delivery configuration including document types, attachment types, and customization settings for the portal.

    

  
    - **EinvoiceDeliveryDocumentTypes** *(list) --* **[REQUIRED]** 

      The types of e-invoice documents to be delivered.

      

    
      - *(string) --* 

      
  
    - **EinvoiceDeliveryAttachmentTypes** *(list) --* 

      The types of attachments to include with the e-invoice delivery.

      

    
      - *(string) --* 

      
  
    - **Protocol** *(string) --* **[REQUIRED]** 

      The communication protocol to use for e-invoice delivery.

      

    
    - **PurchaseOrderDataSources** *(list) --* **[REQUIRED]** 

      The sources of purchase order data to use for e-invoice generation and delivery.

      

    
      - *(dict) --* 

        Specifies the source configuration for retrieving purchase order data.

        

      
        - **EinvoiceDeliveryDocumentType** *(string) --* 

          The type of e-invoice document that requires purchase order data.

          

        
        - **PurchaseOrderDataSourceType** *(string) --* 

          The type of source for purchase order data.

          

        
      
  
    - **ConnectionTestingMethod** *(string) --* **[REQUIRED]** 

      The method to use for testing the connection to the procurement portal.

      

    
    - **EinvoiceDeliveryActivationDate** *(datetime) --* **[REQUIRED]** 

      The date when e-invoice delivery should be activated for this preference.

      

    
  
  :type PurchaseOrderRetrievalEnabled: boolean
  :param PurchaseOrderRetrievalEnabled: **[REQUIRED]** 

    Indicates whether purchase order retrieval is enabled for this procurement portal preference. Set to true to enable PO retrieval, false to disable.

    

  
  :type Contacts: list
  :param Contacts: **[REQUIRED]** 

    List of contact information for portal administrators and technical contacts responsible for the e-invoice integration.

    

  
    - *(dict) --* 

      Represents contact information for a person or role associated with the procurement portal preference.

      

    
      - **Name** *(string) --* 

        The name of the contact person or role.

        

      
      - **Email** *(string) --* 

        The email address of the contact person or role.

        

      
    

  :type ResourceTags: list
  :param ResourceTags: 

    The tags to apply to this procurement portal preference resource. Each tag consists of a key and an optional value.

    

  
    - *(dict) --* 

      The tag structure that contains a tag key and value.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The object key of your of your resource tag.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The specific value of the resource tag.

        

      
    

  :type ClientToken: string
  :param ClientToken: 

    A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

    This field is autopopulated if not provided.

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'ProcurementPortalPreferenceArn': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **ProcurementPortalPreferenceArn** *(string) --* 

        The Amazon Resource Name (ARN) of the created procurement portal preference.

        
  
  **Exceptions**
  
  *   :py:class:`Invoicing.Client.exceptions.ConflictException`

  
  *   :py:class:`Invoicing.Client.exceptions.ValidationException`

  
  *   :py:class:`Invoicing.Client.exceptions.InternalServerException`

  
  *   :py:class:`Invoicing.Client.exceptions.ServiceQuotaExceededException`

  
  *   :py:class:`Invoicing.Client.exceptions.ThrottlingException`

  
  *   :py:class:`Invoicing.Client.exceptions.AccessDeniedException`

  