To solve Pierre's optimization problem, we first need to define the decision variables, objective function, and constraints based on the given information.

1. **Decision Variables**:
   - Let \(S\) be the number of sandals Pierre decides to buy.
   - Let \(L\) be the number of slippers Pierre decides to buy.

2. **Objective Function**:
   - The profit per sandal sold is $70, and the profit per slipper sold is $30. Therefore, the total profit \(P\) can be represented as \(P = 70S + 30L\).
   - Since we are trying to maximize profit, our objective function is to maximize \(P\).

3. **Constraints**:
   - The demand for sandals is at least three times the demand for slippers: \(S \geq 3L\).
   - Pierre can invest at most $3000 in his first inventory. Given that sandals cost $50 and slippers cost $20, we have: \(50S + 20L \leq 3000\).
   - Non-negativity constraints: Since Pierre cannot buy a negative number of items, both \(S \geq 0\) and \(L \geq 0\).

Given these definitions, the problem can be represented as a linear programming problem:

Maximize: \(70S + 30L\)

Subject to:
- \(S \geq 3L\)
- \(50S + 20L \leq 3000\)
- \(S, L \geq 0\)

Now, let's translate this into Gurobi code in Python:

```python
from gurobipy import *

# Create a new model
m = Model("Pierre_eCommerce")

# Define the decision variables
S = m.addVar(lb=0, vtype=GRB.INTEGER, name="Sandals")
L = m.addVar(lb=0, vtype=GRB.INTEGER, name="Slippers")

# Set the objective function to maximize profit
m.setObjective(70*S + 30*L, GRB.MAXIMIZE)

# Add constraints
m.addConstr(S >= 3*L, "DemandConstraint")
m.addConstr(50*S + 20*L <= 3000, "BudgetConstraint")

# Optimize the model
m.optimize()

# Print the solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Buy {S.x} sandals and {L.x} slippers")
    print(f"Maximum profit: ${70*S.x + 30*L.x}")
else:
    print("No optimal solution found")

```