Unable to get PubSubMessage value in pub/sub connectorInputPayload

Hi,

Hope you are doing great!!
I have  a requirement like I want to send a message through the pub/sub connector with the OpportunityId = 00rDJQWX. The value of OpportunityId also changes when we modify an opportunity status in Salesforce.
So, how did we sent this OpportunityId in the PubSubConnectorInputPayload message ?

I am referring to the attachment below.

Untitled.png

Thanks

Solved Solved
0 2 115
1 ACCEPTED SOLUTION

Hi @Amankumawat , Thanks for your question.

You can use the data mapper task to map data from variables to the input variables for the Connector Task.  For example, you could create the connectorInputPayload.message attribute with the value of Opportunity ID, or you could create a string like "OpporunityID = 00rDJQWX" and set that to the .message attribute using a concatenate mapping function, etc... Here are some example mapping rules where I'm extracting some data from the Saleforce Trigger, and then setting local variables and also setting a connectorInputPayload.message variable:

Screenshot 2023-02-27 at 10.43.21 AM.png

In the docs, you can also see a sample of the format used for the message attribute:
https://cloud.google.com/apigee/docs/api-platform/integration/get-started-connectors

  1. In the Default Value field, enter the following text: {"message": "test message from integration platform"}.

@Amankumawat wrote:

Hi,

Hope you are doing great!!
I have  a requirement like I want to send a message through the pub/sub connector with the OpportunityId = 00rDJQWX. The value of OpportunityId also changes when we modify an opportunity status in Salesforce.
So, how did we sent this OpportunityId in the PubSubConnectorInputPayload message ?

I am referring to the attachment below.

Untitled.png

Thanks



@Amankumawat wrote:

Hi,

Hope you are doing great!!
I have  a requirement like I want to send a message through the pub/sub connector with the OpportunityId = 00rDJQWX. The value of OpportunityId also changes when we modify an opportunity status in Salesforce.
So, how did we sent this OpportunityId in the PubSubConnectorInputPayload message ?

I am referring to the attachment below.

Untitled.png

Thanks


 

View solution in original post

2 REPLIES 2

Hi @Amankumawat , Thanks for your question.

You can use the data mapper task to map data from variables to the input variables for the Connector Task.  For example, you could create the connectorInputPayload.message attribute with the value of Opportunity ID, or you could create a string like "OpporunityID = 00rDJQWX" and set that to the .message attribute using a concatenate mapping function, etc... Here are some example mapping rules where I'm extracting some data from the Saleforce Trigger, and then setting local variables and also setting a connectorInputPayload.message variable:

Screenshot 2023-02-27 at 10.43.21 AM.png

In the docs, you can also see a sample of the format used for the message attribute:
https://cloud.google.com/apigee/docs/api-platform/integration/get-started-connectors

  1. In the Default Value field, enter the following text: {"message": "test message from integration platform"}.

@Amankumawat wrote:

Hi,

Hope you are doing great!!
I have  a requirement like I want to send a message through the pub/sub connector with the OpportunityId = 00rDJQWX. The value of OpportunityId also changes when we modify an opportunity status in Salesforce.
So, how did we sent this OpportunityId in the PubSubConnectorInputPayload message ?

I am referring to the attachment below.

Untitled.png

Thanks



@Amankumawat wrote:

Hi,

Hope you are doing great!!
I have  a requirement like I want to send a message through the pub/sub connector with the OpportunityId = 00rDJQWX. The value of OpportunityId also changes when we modify an opportunity status in Salesforce.
So, how did we sent this OpportunityId in the PubSubConnectorInputPayload message ?

I am referring to the attachment below.

Untitled.png

Thanks


 

Thanks @shaaland