BassemE/mulesoft-documentation-embeddings huggingface dataset:
ServiceNow Connector 6.7 | MuleSoft Documentation
# ServiceNow Connector 6.7
Anypoint Connector for ServiceNow (ServiceNow Connector) provides connections between Mule runtime engine (Mule) and ServiceNow apps. Use the ServiceNow operations with the custom ServiceNow tables, along with any operations available through the installed plugins.
For compatibility information and fixed issues, see the ServiceNow Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow and global elements
  * How to create a Mule app using Anypoint Studio


Before creating an app, you must have access to the ServiceNow target resource and Anypoint Platform.
## Common Use Cases For the Connector
ServiceNow Connector enables organizations to fully integrate business processes across HR, legal, procurement, operations, marketing, and facilities departments. Creating connectivity within and outside of the enterprise is quick and simple with the integration of over 120 Anypoint Connectors.
Use ServiceNow Connector to create instant API connectivity with the ServiceNow API, and quickly and easily interface with ServiceNow from within Anypoint Platform.
For examples, see example use cases, which include getting a ServiceNow incident record.
## Audience
  * New users, read:
    * Using Anypoint Studio to Configure the Connector to create your Mule app
  * Advanced users, read:
    * XML and Maven Support
    * Examples, which provides one or more use cases for the connector


## Connection Types
The following authentication types are supported:
  * Basic
  * OAuth 2.0 Authorization Code


### Limitations
  * OAuth 2.0 Authorization Code authentication works only with the following versions of Mule:
    * 4.1.5
    * 4.2.1 and later
  * Metadata does not work with OAuth 2.0 Authorization Code authentication.


## Use Exchange Templates and Examples
Anypoint Exchange provides templates you can use as a starting point for your app, as well as examples that illustrate a complete solution.
  * Workday and ServiceNow Worker Bidirectional Sync
  * Workday Worker to ServiceNow Service Request Migration
  * Workday and ServiceNow Employee Aggregation
  * Workday to ServiceNow Service Worker Migration
  * Workday Worker to ServiceNow Service Request Broadcast


## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app with Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Anypoint Exchange to Discover Connectors, Templates, and Examples
  * ServiceNow Connector Release Notes
  * ServiceNow Connector on Exchange
  * MuleSoft Help Center
APIkit for GraphQL | MuleSoft Documentation
# APIkit for GraphQL
GraphQL is a data query and manipulation language that enables API consumers to ask for data that is relevant only to them. The APIkit for GraphQL module works with Anypoint Code Builder, which enables you to develop Mule applications. This module supports implementing GraphQL services, which use connectors to map GraphQL APIs to the existing backends where source data is stored.
The APIkit scaffolder enables you to quickly implement projects by generating the initial skeleton of the application at design time based on the GraphQL schema. The application design maps queries, mutations, and types in your API to the Mule flows, so you only specify how your data sources fulfill a particular data type.
At run time, the APIkit for GraphQL router analyzes the query graph and orchestrates the execution of Mule flows based on the requests. The result of each flow execution is combined to return a result that mirrors the shape of the requested query.
## See Also
  * Implement a GraphQL API
  * Mapping a GraphQL API to Your Data Sources
  * Querying a GraphQL API Implementation
  * APIkit for GraphQL Module Reference
randomInt | MuleSoft Documentation
# randomInt
## randomInt(upperBound: Number): Number
Returns a pseudo-random whole number from `0` to the specified number (exclusive).
### Parameters
Name | Description  
---|---  
`upperBound` | A number that sets the upper bound of the random number.  
### Example
This example returns an integer from 0 to 1000 (exclusive).
#### Source
```
%dw 2.0
output application/json
---
{ price: randomInt(1000) }
```

#### Output
```
{ "price": 442.0 }
```
External Libraries | MuleSoft Documentation
# External Libraries
Connectors and Modules sometimes depend on external libraries that cannot be packaged inside the connector due to licensing, versioning, custom libs, and so on.
The Database connector is an example of a case where the same base code you can work with several different drivers and several versions of a same driver. The solution to this problem is ask users of the Database connector to identify the JDBC Driver to use for the database to which they want to connect.
## Usage
To declare that the Connector or Module requires an external library to work in a Mule app, you need to annotate your `@Extension`, Configuration, or ConnectionProvider class with the `@ExternalLib` annotation and provide properties that will help the Mule App developer understand how to configure these libraries.
To help your users configure libraries more easily, it is highly recommended that you fill out all the properties that the annotation provides, for example:   
---  
```
@ExternalLib(name = "MySQL JDBC Driver",
description = "A JDBC driver that supports connection to the MySQL Database",
nameRegexpMatcher = "(.*)\\.jar",
requiredClassName = "com.mysql.jdbc.Driver",
coordinates = "mysql:mysql-connector-java:5.1.44")
public class MySqlConnectionProvider implements ConnectionProvider<Connection> {
 //
}
```

+ Note that a Connector can require multiple external libraries. The `@ExternalLib` annotation can be used many times as needed.
### Properties
Property | Required | Type | Description  
---|---|---|---  
Friendly name to be displayed in the UI.  
`description` | Short description of the external library.  
`nameRegexpMatcher` | Regular expression used to match the name of the library’s file and validate that the library specified by your user is the correct one.  
`requiredClassName` | _(Only for Java Libraries)_ Name of a `Class` that will be present in the external library. This will be used for validating whether the library specified by your user is the correct one.  
  * `NATIVE`: Native library dependency
  * `JAR`: JAR file dependency
  * `DEPENDENCY`: External dependency (for example, an obtained dependency that is specified in the `pom.xml` if you are using Maven)

|  For custom connectors, all Maven dependencies must be accessible from Anypoint Exchange. Maven dependencies published to private or public repositories are not accessible from Anypoint Exchange. You can publish Maven dependencies before publishing your custom connector by using one of the following options:
  * Publish the Maven dependencies on Anypoint Exchange to make them available to your Anypoint Platform organization.
  * Publish the Maven dependencies on the Maven Central repository to make them publicly available.

You cannot use MuleSoft repositories for publishing.  
---  
`coordinates` | Maven coordinates suggestion that indicates where the required library can be found. They should follow Maven’s convention `groupId:artifactId:packaging:classifier:version`.  
Indicates whether the library is not required for the Connector or Module to work.
Configure a Redelivery Policy | MuleSoft Documentation
# Configure a Redelivery Policy
A redelivery policy is a filter that helps you conserve resources by limiting the number of times the Mule runtime engine (Mule) executes messages that generate errors. You can add a redelivery policy to any source in a flow.
When you add a redelivery policy to a flow’s source, Mule evaluates the received data before it executes the flow’s components. If a message delivery fails a specified number of times, the redelivery policy prevents the flow from processing the received data and raises a REDELIVERY_EXHAUSTED error.
## Redelivery Policy Configuration Parameters
Field | Type | Default Value | Description  
---|---|---|---  
**Max Redelivery Count** |  Maximum number of times that a message can be redelivered to the flow and processed unsuccessfully before raising a MULE:REDELIVERY_EXHAUSTED error.  
**Use Secure Hash** |  Indicates whether to use a secure hash algorithm to identify a redelivered message.  
**Message Digest Algorithm** |  Secure hashing algorithm to use for the message. If the payload of the message is a Java object, Mule ignores the **Message Digest Algorithm** value and returns the value that the payload’s `hashCode()` returned.  
**ID Expression** |  Defines one or more expressions that determine when a message has been redelivered. This property can be set only if the value of **Use Secure Hash** is False.  
**Object Store** |  Object Store created by Mule’s default `ObjectStoreManager`. Nonpersistent, with an `entryTtl` of 300 seconds and an `expirationInterval` of 6 seconds. |  Object Store in which the redelivery counter for each message is stored. You can configure the Object Store as a reference or an inner element. For information, see the Object Store connector documentation.  
## How the Redelivery Policy Works
Each time the source receives a new message, Mule identifies the message by generating its key.
  * If the processing flow causes an exception, Mule increments the counter associated with the message key. When the counter reaches a value greater than the configured **maxRedeliveryCount** value, Mule throws a MULE:REDELIVERY_EXHAUSTED error.
  * If the processing flow does not cause an exception, its counter is reset.


## Errors
  * MULE:REDELIVERY_EXHAUSTED
Thrown when the number of executions that raise an error is greater than the configured **maxRedeliveryCount** value.


## Example
In this example, Mule logs an error with a `Redelivery exhausted in http listener` message when the **maxRedeliveryCount** of 2 is exceeded:
```
<flow name="logOnRedeliveryExhausted">
  <http:listener path="test" config-ref="listenerConfig">
    <redelivery-policy maxRedeliveryCount="2" useSecureHash="true"/>
  </http:listener>
  <flow-ref name="processData"/>
  <error-handler>
    <on-error-continue type="MULE:REDELIVERY_EXHAUSTED">
      <logger message="Redelivery exhausted in http listener" level="ERROR"/>
    </on-error-continue>
  </error-handler>
</flow>
```

## See Also
  *   * Flow and Subflow Scopes
OAuth 2.0 Token Validation | MuleSoft Documentation
# OAuth 2.0 Token Validation
You can configure access scopes if you use any one of the OAuth 2.0 policies provided in API Manager. You specify the scope of access that client applications have using their credentials. The provider (OpenAM, OpenID Connect, PingFederate, or Mule provider) has to support the scopes you define for the application. You need to know the names of the scopes as defined in OpenAM, PingFederate, or Mule provider or the OpenID Connect Token Introspection endpoint, and enter them in string format when you configure and apply the policy on Anypoint Platform. Scope names are case-sensitive.
To apply the policy to an API, use the general procedure for applying policies. Configure the optional scopes and required token validation endpoint URL as described in this procedure.
## Scopes
  1. In the optional Scopes field, enter a space-separated list of supported OAuth scopes, such as `read write`. The scopes are case-sensitive.
  2. Specify scopes that match one or more of the scopes defined on the referenced OAuth 2.0 Provider application.
In the case of a Mule OAuth 2.0 provider, if the Mule provider does not define scopes, leave this field blank. If you plan to use API Console to simulate the API, leave scopes blank and apply the CORS policy.


## Access Token Validation Endpoint URL
OAuth 2.0 Access Token Enforcement policy requires the Access Token validation endpoint url, which defines the service that will be called to validate the access token.
In the required **Access Token validation endpoint url** field, you enter the URL of the external OAuth 2.0 Provider used for granting the access token, for example `https://oauth2provider.cloudhub.io/validate`.
## See Also
  *   *
Scripting Module 2.1 | MuleSoft Documentation
# Scripting Module 2.1
Scripting module executes custom logic written in a scripting language. In some cases, you might need to create custom code to perform all or part of a complex task, or to reuse modules that you have already written. Starting with Scripting module version 2.0, you must provide a compliant `jsr-223` scripting language engine.
## Before You Begin
To use this module, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements in a Mule flow
  * Global elements
  * Creating a Mule app using Anypoint Studio


Before creating an app, you must have access to Anypoint Platform.
## Common Use Cases for the Module
Scripting module performs logic in a supported language, which enables you to access variables and the registry, log information via the Mule logger, read payloads, and so on.
For examples, see Examples.
## Audience
  * New user, read:
    * Using Anypoint Studio to Configure the Connector to create your Mule app
    * Examples, which provides one or more use cases for the connector
  * Advanced user, read:
    * XML and Maven Support
    * Examples, which provides one or more use cases for the connector


For a major or minor release, see Upgrading and Migrating.
## Next Step
After you complete the prerequisites and experiment with templates and examples, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
runUrl | MuleSoft Documentation
# runUrl
## runUrl(url: String, readerInputs: Dictionary<ReaderInput> = {}, inputValues: Dictionary<Any> = {}, configuration: RuntimeExecutionConfiguration = {}): RunResult
Runs the script at the specified URL.
_Experimental:_ This function is an experimental feature that is subject to change or removal from future versions of DataWeave.
### Parameters
Name | Description  
---|---  
The name of the file to execute.  
`readerInputs` | Inputs to read and bind to the execution.  
`inputValues` | Inputs to be bind directly to the execution.  
`configuration` | The runtime configuration.  
### Example
This example shows how `runUrl` behaves with different inputs.
#### Source
```
import * from dw::Runtime
var jsonValue = {
 value: '{"name": "Mariano"}' as Binary {encoding: "UTF-8"},
 encoding: "UTF-8",
 properties: {},
 mimeType: "application/json"
}
var Utils = "fun sum(a,b) = a +b"
---
{
 "execute_ok" : runUrl("classpath://org/mule/weave/v2/engine/runtime_runUrl/example.dwl", {"payload": jsonValue })
}
```

#### Output
```
{
  "execute_ok": {
   "success": true,
   "value": "\"Mariano\"",
   "mimeType": "application/dw",
   "encoding": "UTF-8",
   "logs": [
   ]
  }
 }
```
Customizing Your Portal Using the Experience Builder | MuleSoft Documentation
# Customizing Your Portal Using the Experience Builder
After the API portal is created using the out-of-the-box styling templates, you can further customize it using the Experience Builder. The Builder customizes a Salesforce Experience Cloud site with your desired brand identity, look and feel, and site structure by providing control over the site’s components, themes, and pages, and its settings for general properties, themes, and SEO.
From the **API management** page, the **Preview and publish your portal** link opens your site for editing each page in your portal, creating new pages, and adding and editing the components on each page. Administrators enter the Salesforce Experience Builder with a shared identity between all administrators. Since the identity of the administrator is shared therefore, API Experience Hub can’t determine the individual administrator’s action in the shared account. If the administrator is already logged in to the Salesforce organization, their previous session isn’t retained when they click the **Preview and publish your portal** button.
The Builder’s interface contains the pages list, component palette, theme menu, page structure menu, and settings menu.
Click **Preview** to view your changes and to see the portal experience for your developer community.
Click **Home** to view the API Carousel with all of the added APIs. Click **APIs** to view the API Catalog, search and filter APIs, and select an API to get more details from the API details page. The API details page displays metadata in the upper section and the API overview and specification in the lower section. Publish any updates by clicking **Publish**.
## See Also
  * Customizing the Portal Look-and-Feel
  * API Experience Hub Lightning Components
  * Using the Builder for Common Customizations
  * Advanced Styling with CSS
  * Previewing and Publishing Your Portal
Add a TLS Context for Anypoint Runtime Fabric (Advanced Configuration) | MuleSoft Documentation
# Add a TLS Context for Anypoint Runtime Fabric (Advanced Configuration)
If your environment requires advanced configuration such as client authentication (mutual authentication), selecting ciphers, and selecting TLS versions, you can import a TLS context from the secrets manager. Refer to Import a TLS Context from Secrets Manager (Advanced).
## See Also
  * Enable Client Authentication
  *   * Supported Secret Types
  * Enable Inbound Traffic on Anypoint Runtime Fabric
Getting Started With Anypoint DataGraph | MuleSoft Documentation
# Getting Started With Anypoint DataGraph
Use the following documentation to learn about key concepts and get started with Anypoint DataGraph.
  * Anypoint DataGraph Quick Start Guide Use this quick start guide to begin using Anypoint DataGraph.
  * Anypoint DataGraph Terminology Learn key terms that are useful for understanding how Anypoint DataGraph works.
  * Understanding the Elements in an API Schema Understand the different types that can be present in your API schema depending on your API specification.
  * Writing GraphQL Queries and Mutations in DataGraph This brief tutorial introduces key concepts for writing GraphQL queries in Anypoint DataGraph.
SAP SuccessFactors 5.0 - Additional Configuration Information | MuleSoft Documentation
# SAP SuccessFactors 5.0 - Additional Configuration Information
Perform additional configuration for Anypoint Connector for SAP SuccessFactors (SuccessFactors Connector), such as using a query as a filter.
## Use a Query as a Filter
To configure the **Query** operation to perform queries over entities of a specified type, follow these steps:
  1. Select the **Query** operation on the canvas.
  2. In the **General** properties tab, select **Query value** from the **Filter** drop-down.
  3. In the **Value** field, enter the filter options using the format described in the ODATA URI Conventions site, item 4.5.
  4. Select the **Entity set name** from the list.


The following are some example queries:
  * `startswith(username, 'Mule') eq true`
  * `startswith(username, 'JA') eq true or endswith(username, 'n3') eq true`
  * `username eq 'Mike'`


The **Query value** is only used for the **Filter** field. The actual query is built by the connector.
## Generate a Keystore File
In SAP SuccessFactors Connector 5.0 and later, **The private key from the X.509 certificate.** is removed from OAuth SAML Bearer Assertion Authentication. You can migrate your existing public-private certificates into a keystore file. These steps show how to generate a Java keystore (JKS) file.
  1. Go to your Mule workspace and open the command prompt (for Windows) or Terminal (for Mac).
  2. Enter this command:
```
keytool -genkeypair -alias successfactors-cert -keyalg RSA -keystore successfactors-cert.jks
```

  3. Enter the following information:
     * Password for the keystore
     * Your first name and last name
     * Your organization unit
     * Your city and state, and the two-letter code for your country
The system generates a Java keystore file (JKS format) that contains a private or public key pair in your workspace.
  4. Provide the file path for the keystore in your connector configuration.
Enter this command:
```
keytool -exportcert -alias successfactors-cert -file successfactors-cert.crt -keystore successfactors-cert.jks
```

The system exports the public key from the keystore into the workspace. This is the public key to enter in your SuccessFactors instance.
  5. Verify that you have both the keystore (`successfactors-cert.jks`) and the public key (`successfactors-cert.crt`) files in your workspace.


## Next Step
After you complete configuring the connector, you can try the Examples.
## See Also
  * Introduction to Anypoint Connectors
  * MuleSoft Help Center
Enterprise Integration Patterns Using Mule | MuleSoft Documentation
# Enterprise Integration Patterns Using Mule
Enterprise Integration Patterns are accepted solutions to recurring problems within a given context. The patterns provide a framework for designing, building messaging and integration systems, as well as a common language for teams to use when architecting solutions.
Mule supports most of the patterns shown in the Enterprise Integration Patterns book written by Gregor Hohpe and Bobby Woolf.
Mule reduces the effort required when building integrations by implementing the patterns that you use to design solutions. You can then simply configure and use these same patterns in Mule.
## Mapping Enterprise Integration Patterns into Mule Objects
Review the following list of Enterprise Integration Patterns that can be mapped directly to Mule objects:
### Integration Styles
Pattern | Mapping to a Mule Object  
---|---  
File Transfer |   
Shared Database |   
Remote Procedure Invocation | Mule APIs are meant to work like this procedure or even doing requests to external APIs.  
Messaging | Mule is all about Messaging.  
### Messaging Systems
Pattern | Mapping to a Mule Object  
---|---  
Message Channel | Mule provides a message channel that connects the message processors in a flow.  
Pipes and Filters | A flow implements a pipe and filter architecture.  
Message Router |   
Message Translator | Message Transformer.  
Message Endpoint | Creating Message Sources with the Mule SDK and Operations.  
### Messaging Channels
Pattern | Mapping to a Mule Object  
---|---  
Point-to-Point Channel | The default channel within a flow.  
Message Bus | Mule is a message bus.  
Guaranteed Delivery | Using Reliability Patterns.  
### Message Construction
Pattern | Mapping to a Mule Object  
---|---  
Event Message | Mule transmits events from different Application or Processors.  
Request Reply | Mule uses connectors that facilitate request-reply wise operations, or using Reliability Patterns.  
### Message Routing
Pattern | Mapping to a Mule Object  
---|---  
Content-Based Router |   
Message Filter |   
Dynamic Routing |   
Scatter Gather | Scatter Gather Router.  
Splitter | Foreach Scope, Parape and Batch.  
Aggregator |   
### Message Transformation
Pattern | Mapping to a Mule Object  
---|---  
Content Enricher | Target Variables.  
### Messaging Endpoints
Pattern | Mapping to a Mule Object  
---|---  
Polling Consumer | Creating Message Sources with the Mule SDK.  
Transactional Client | Transaction Management.  
Idempotent Receiver | Redelivery Policy.
Configuring Timeouts in Connected Mode | MuleSoft Documentation
# Configuring Timeouts in Connected Mode
Flex Gateway offers these timeouts to improve service quality and reduce computing resource waste:
  * **Stream Idle Timeout** The Stream Idle Timeout enables you to set a maximum amount of a time a stream can remain idle without receiving any data in either the inbound (client to Flex Gateway) or outbound (Flex Gateway to upstream service) direction.
By default, all Flex Gateway API instances have a stream timeout of 300 seconds.
  * **Upstream Idle Timeout** The Upstream Idle Timeout enables you to set a maximum amount of time a stream between Flex Gateway and the upstream service can remain idle between requests.
By default, all Flex Gateway API instances have an upstream idle timeout of 60 seconds.
  * **Response Timeout** The Response Timeout enables you to set a maximum amount of a time Flex Gateway waits for a response from an upstream service. The timeout time starts at the last request sent by Flex Gateway.
By default, all Flex Gateway API instances have a response timeout of 15 seconds.


You can configure these timeouts via:
  * Environment variables: Applies to all API instances and is the most permanent configuration option.
  * Configuration YAML file: Applies to all API instances and is easy to adjust.
  * Policy: Applies to just one API instance or upstream providing granularity and is easy to adjust.


## Configure Timeouts via Environment Variables
Configure timeouts with these environment variables:
```
FLEX_STREAM_IDLE_TIMEOUT_SECONDS: 300
FLEX_UPSTREAM_CONNECTION_IDLE_TIMEOUT_SECONDS/FLEX_CONNECTION_IDLE_TIMEOUT_SECONDS: 60
FLEX_UPSTREAM_RESPONSE_TIMEOUT_SECONDS: 15
```

Edit the variables with your desired configurations.
## Configure Timeouts via YAML Configuration Resources
Edit and then apply this configuration resource to update your timeouts:
```
apiVersion: gateway.mulesoft.com/v1alpha1
kind: Configuration
metadata:
 name: timeouts-config
spec:
 timeouts:
  upstreamConnectionIdleSeconds: 300
  upstreamResponseSeconds: 15
  streamIdleSeconds: 60
```

## Configure Timeouts via Policies
Apply these policies to your API instance or upstream service:
  * Stream Idle Timeout Policy
  * Upstream Idle Timeout Policy
  * Response Timeout Policy
Getting Started with API Functional Monitoring | MuleSoft Documentation
# Getting Started with API Functional Monitoring
After you become familiar with the API Functional Monitoring UI and concepts covered in the API Functional Monitoring Overview, you are ready to start monitoring your APIs.
## Before You Begin
To use API Functional Monitoring, you must have the permissions required for the actions you want to execute. Permissions are set by your organization administrator.
Permission | Actions  
---|---  
Create Applications (Runtime Manager) | Create private locations  
Delete Applications (Runtime Manager) | Delete private locations  
Manage Settings (Runtime Manager) | Update private locations  
View Environment | Log in using BAT CLI  
View Organization | Use Secrets Manager through BAT CLI  
Exchange Contributor (Exchange) | Create or modify a monitor; add or modify a schedule  
Exchange Administrator (Exchange) | Create, modify, or delete a monitor; add, modify, or delete a schedule  
Grant access to secrets (Secrets Manager) | Use Secrets Manager  
## Monitor Your APIs Using the Functional Monitoring UI
To monitor your APIs in Functional Monitoring:
  1. Create monitors for the APIs that you want to test. This includes:
     * Adding locations and schedules
     * Configuring tests for the API endpoints
     * Setting notifications through reporting tools
  2. View monitor history.


## Monitor Your APIs Using BAT CLI
To monitor your APIs using BAT CLI:
  1.   2. Create a test suite from an example or by populating the lines yourself.
  3. Write tests using BDD test-writing syntax.
  4. Run a test suite.
  5. Schedule testing and monitoring.
  6. Create monitors that use a specific location.


## Additional Options and Reporting
Additionally you can:
  * Download monitors from Functional Monitoring to use them with BAT CLI or to modify them to create more complex test cases.
  * Upload monitors you have manually written or modified to use them in Functional Monitoring.
  * Use BAT CLI to configure monitoring reports in one of the supported reporting systems.
  * Write and run BAT tests in IntelliJ IDEA.


## See Also
  * API Functional Monitoring Overview
  * Managing Permissions in Access Management
MuleSoft Accelerator for Consumer Goods | MuleSoft Documentation
# MuleSoft Accelerator for Consumer Goods
MuleSoft Accelerator for Consumer Goods helps consumer goods companies integrate their digital operations to gain visibility into trade promotion management and retail execution. Our foundational assets are expertly designed to jumpstart your top integration and business initiatives so that IT teams can spend more time innovating and less time building from scratch.
## Use Cases
### Product and Account Integration with Hierarchies
The Product and Account Integration with Hierarchies use case surfaces relevant product, customer, demand planning, and pricing information from ERP and PIM systems and easily consolidate this information into Trade Promotion Management (TPM) platforms like Salesforce Consumer Goods Cloud for informed promotional planning.
### Retail Execution
The Retail Execution use case unlocks shelf data to enable perfect retail execution with pre-built assets. Access store audit data from image recognition software, like Trax, and smoothly integrate into Retail Execution platforms, such as Salesforce Consumer Goods Cloud, to monitor at shelf performance in one platform.
### Trade Promotion Effectiveness
The Trade Promotion Effectiveness use case allows you to visualize your promotions in one integrated platform with pre-built assets that integrate Business Intelligence Tools (BI Tools), such as CRM Analytics, into a TPM platform like Salesforce Consumer Goods Cloud.
### Trade Promotion Optimization
The Trade Promotion Optimization use case allows you to visualize your promotions in one integrated platform with pre-built assets that integrate Business Intelligence Tools (BI Tools), such as CRM Analytics, into a TPM platform like Salesforce Consumer Goods Cloud.
### POS Integration
The POS Integration use case enables retail developers to leverage pre-built integrations to connect order and loyalty data from Point of Sale (POS) systems to Data Cloud.
### Pricing Data integration for Trade Promotion Management
The Pricing Data Integration for TPM use case enables consumer packaged goods companies to more effectively analyze and optimize promotional activities by integrating List Price and Cost of Goods Sold data with Hyperforce.
## See Also
  *   *   *   * MuleSoft Accelerator for Consumer Goods on Exchange
Move Transformation to Separate Files (Anypoint Studio) | MuleSoft Documentation
# Move Transformation to Separate Files (Anypoint Studio)
By default, the DataWeave code from a Transform Message component is expressed inline within your Mule XML file. You can instead keep each in a separate file ( `.dwl` ) and have your XML reference them. These files are packaged with your Mule application when built.
To export the DataWeave code to a `.dwl` file:
  1. Click the **Edit Current Target** button.
  2. Select the **File** radio button.
     * Type a name for your `.dwl` file.
     * Click **OK**.


A file is created under the `src/main/resources` folder in your project containing your DataWeave code.
## See Also
DataWeave Language
Transform Message Component
AS2 Connector 6.4 | MuleSoft Documentation
# AS2 Connector 6.4
Mule runtime engine (Mule) supports the AS2 protocol through Anypoint Connector for AS2 (AS2 Connector).
AS2 Connector enables trading partners to transmit and receive AS2 messages with EDI-X12, EDIFACT, XML, or binary payloads, for example:
  * Send messages, signed or unsigned, over HTTP or HTTPS, using the AS2 protocol
  * Receive messages over HTTP or HTTPS, using the AS2 protocol
  * Receive asynchronous MDN for sent messages


For compatibility information and fixed issues, see the AS2 Connector Release Notes.
For a major or minor release, see Upgrading and Migrating.
## Before You Begin
To use this connector, you must be familiar with:
  * The AS2 target resource
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * How to create a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have access to:
  * Credentials to access the AS2 target resource
  * Anypoint Platform
  * Anypoint Studio version 7.6 or later


## Common Use Cases for the Connector
Common use cases for AS2 Connector include the following:
  * Send with sync MDN


Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for a synchronous MDN (receipt)
  * Send with async MDN


Sends a message through HTTP or HTTPS using the AS2 protocol requesting the partner for an asynchronous MDN (receipt)
  * Listener


Source that receives messages via HTTP or HTTPS using the AS2 protocol
  * MDN Listener


Source that receives asynchronous MDN receipts via HTTP or HTTPS using the AS2 protocol
  * Non repudiation Listener


Source that receives a signed copy of a receipt or a message for persistent non-repudiation storage
## Non-Repudiation Storage of AS2 Messages and MDNs
If needed, you can configure non-repudiation storage for your AS2 operations to support regulatory or compliance requirements.
Only signed messages and MDNs are eligible for non-repudiation.
The following AS2 Connector sources and operations support the non-repudiation feature:
  * AS2 Send Sync operation
  * AS2 Send Async operation
  * AS2 Listener source
  * AS2 MDN Listener source


### Before You Begin for Non-Repudiation Storage
To enable non-repudiation of a message in AS2 Connector, you must implement and configure a separate Mule flow that acts as a non-repudiation flow:
  * The non-repudiation flow must have access to the signed MIME message that is passed to it, along with appropriate non-repudiation specific attributes.
  * This non-repudiation-specific Mule flow is responsible for receiving, storing, and acting upon the messages and attributes it receives.
  * The name of this non-repudiation flow must be configured on an appropriate listener or operation that has non-repudiation storage enabled.


## Next Step
After you complete the prerequisites, you are ready to create an app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Email Connector 1.7 | MuleSoft Documentation
# Email Connector 1.7
Support Category: Select
Anypoint Connector for Email (Email Connector) sends and retrieves email messages over standard email protocols. Email Connector configurations share a basic set of parameters that require a connection over the protocols you use.
For compatibility information and fixed issues, see the Email Connector Release Notes.
## Before You Begin
To use this connector, you must be familiar with:
  * Anypoint Connectors
  * Mule runtime engine (Mule)
  * Elements and global elements in a Mule flow
  * Creating a Mule app using Anypoint Studio (Studio)


Before creating an app, you must have access to Anypoint Platform and Anypoint Studio.
## Common Use Cases for the Connector
Email Connector enables you to:
  * Retrieve emails from POP3 mailboxes
  * Retrieve, delete, move and store emails from IMAP mailboxes
  * Send emails over the SMTP protocol
  * Support secure connections for all protocols over Transport Layer Security (TLS)


For examples, see Examples.
## Next Step
After you complete the prerequisites and try the templates and examples, you are ready to create your own app and configure the connector using Anypoint Studio.
## See Also
  * Introduction to Anypoint Connectors
  * Use Exchange to Discover Connectors, Templates, and Examples
  * MuleSoft Help Center
Cryptography Module XML and Maven Support | MuleSoft Documentation
# Cryptography Module XML and Maven Support
Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio.
If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file.
When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file.
## Add a Namespace for the Connector
Paste the following code inside the `<mule>` tag of the header of your configuration XML:
```
http://www.mulesoft.org/schema/mule/cryptography
http://www.mulesoft.org/schema/mule/cryptography/current/mule-cryptography.xsd
```

This example shows how the namespace statements are placed in the `<mule>` XML block:
```
<mule xmlns:compression="http://www.mulesoft.org/schema/mule/cryptography"
	xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
	xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns:file="http://www.mulesoft.org/schema/mule/file"
	xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
	http://www.mulesoft.org/schema/mule/core/current/mule.xsd
	http://www.mulesoft.org/schema/mule/file
	http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
	http://www.mulesoft.org/schema/mule/http
	http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
	http://www.mulesoft.org/schema/mule/ee/core
	http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
	http://www.mulesoft.org/schema/mule/cryptography
	http://www.mulesoft.org/schema/mule/cryptography/current/mule-cryptography.xsd">
```

## Add a POM File Dependency
The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector:
```
<dependency>
 <groupId>org.mule.modules</groupId>
 <artifactId>mule-cryptography-module</artifactId>
 <version>x.x.x</version>
 <classifier>mule-plugin</classifier>
</dependency>
```

Replace `x.x.x` with the version that corresponds to the connector you are using.
To obtain the most up-to-date `pom.xml` file information:
  1. Go to Anypoint Exchange.
  2. In Exchange, click **Login** and supply your Anypoint Platform username and password.
  3. In Exchange, search for `cryptography`.
  4. Select the connector.
  5. Click **Dependency Snippets** near the upper right of the screen.


## See Also
  * Introduction to Anypoint Connectors
  * Salesforce Help Center